home *** CD-ROM | disk | FTP | other *** search
/ Lexis Nexis Millenium Plus Collection 1997 to 1997 / Lexis-Nexis Millenium Plus Collection - 1996-97 (Lexis-Nexis)(LA1173-0 07-96)(1996).bin / pc / products / elevid95 / eef.inf < prev    next >
INI File  |  1996-08-14  |  154KB  |  5,203 lines

  1. DefineVariables
  2. Text [Product_ID]    ;;:= 001-0004-2-F96A
  3. Text [Product_Name] ;;:= Legal Research Guide: Patterns and Practice, Second Ed., 1990; Bonita K. Roberts, St. Mary's University School of Law; Linda L. Schlueter, Esq.
  4. Text [Version_Number] ;;:= F96A
  5. Text [Default_Program_Group] ;;:= Emanuel Legal Education
  6. Text [Default_Directory_Name] ;;:= \ln-edu\etm
  7. Text [Infobase_Title] ;;:= Legal Research Guide
  8. Text [Icon_Name] ;;:= Legal Research Guide
  9. Text [Infobase_File_Name] ;;:= RBRTSRW.NFO
  10. Text [Shadow_File_Name] ;;:= RBRTSRW.SDW
  11. Text [LDF_File_Name] ;;:= RBRTSRW.LDF
  12. Text [Price] ;;:= 19.95
  13. Text [Dial_Number] ;;:= 880-6947
  14. Text [Orig_Dial_Number]
  15. Text [Support_Number] ;;:= 800-555-5555
  16. Text [Disk_Space_Required] ;;:= 0
  17.  
  18.  
  19. ;; Begin Procedure Definition Variables
  20. ;;
  21. Text [Reg_FName] := 
  22. Text [Reg_MName] := 
  23. Text [Reg_LName] := 
  24. Text [Reg_GradYear] := 
  25. Text [Reg_EMail] := 
  26. Text [Reg_Media] := 
  27. Text [Reg_CCNo] := 
  28. Text [Reg_ExpDate] := 
  29. Text [RegUpdate_Text] :=
  30. Text [Reg_IAttempt] := 
  31. Text [Reg_SchoolId] := 
  32. Text [Reg_Phone] := 
  33. Text [Reg_Zip] := 
  34. Text [Reg_State] := 
  35. Text [Reg_City] := 
  36. Text [Reg_Addr2] := 
  37. Text [Reg_Addr1] := 
  38. Text [Reg_LnId] :=
  39. Number [Reg_CBStore] := 1
  40.  
  41. Number [Product_Number]
  42.  
  43. Text [SysFile_Sver] :=
  44. Text [SysFile_Tver] :=
  45. Text [StringS1] := BlankString
  46.  
  47. Text [Screen_Option]
  48. Text [User_Id]
  49. Text [User_Time]
  50. Text [User_Date]
  51. Number [User_Install]
  52. Text [User_Version]
  53. Text [ReInstall_File]
  54. Text [ReInstall_Dir]
  55.  
  56. Number [Products_Ptr]   := 0
  57. Number [Products_End]   := 0
  58. Number [Count_Num]      := 0
  59. Text   [Products_Match] := BlankString
  60.  
  61. Number [Total_QueSize]
  62. Number [FSPC_OnDrive]
  63. Number [FSPC_Needed]
  64. Text   [FSPC_Directory]
  65. Number [FSPC_Additional]
  66.  
  67. TextArray [Files]
  68. Number    [Files_Idx]
  69.  
  70. Number [Dialog_RcMain] := 0
  71. Text   [Dialog_FullInstallRc] := 
  72.  
  73. ;; Variables: FSPChk
  74. Text      [FSPChk_Options]    :=   
  75. Text      [FSPChk_DirCheck]   :=
  76. Text      [FSPChk_DirString]  := 
  77. Text      [FSPChk_Drive]      := 
  78. Text      [FSPChk_CurrentDir] := 
  79. Number    [FSPChk_Count1]     := 0
  80. Number    [FSPChk_FreeSpace]  := 0
  81. Number    [FSPChk_QueSize]    := 0
  82. Number    [FSPChk_Required]   := 0
  83. Number    [FSPChk_Rc]         :=    
  84. Number    [FSPChk_MaxIdx]     :=
  85. Number    [FSPChk_Count]      := 
  86. TextArray [FSPChk_MsgList] 
  87. TextArray [FSPChk_Dir]         
  88.  
  89. ;; Variables: ISysFilesB
  90. Text      [ISysFileB_Str1]     := 
  91. Text      [ISysFileB_Dir]      :=
  92. Text      [ISysFileB_TDir]     := 
  93. Text      [ISysFileB_BFile]    := 
  94. Text      [ISysFileB_Str2]     := 
  95. Text      [ISysFileB_Str3]     := 
  96. Number    [ISysFileB_InUseIdx] := 0
  97. Number    [ISysFilesB_Group]   := 0
  98. Number    [ISysFileB_Num1]     := 0
  99. Number    [ISysFileB_DialogRC] := 
  100. Number    [ISysFileB_Rc]       := 0
  101. TextArray [ISysFileB_InUse] 
  102. TextArray [ISysFileB_Names] 
  103.  
  104. ;; Variables: GetGroup
  105. TextArray [GetGroup_Name] 
  106. Number    [GetGroup_Idx] := 0
  107. Text      [GetGroup_Select] := 
  108. TextArray [GetGroup_Info] 
  109. Number    [GetGroup_InfoIdx]    := 0
  110. Text      [GetGroup_InputGrp] := 
  111. Text      [GetGroup_Input] := 
  112.  
  113. ;; Variables: ReadWrt
  114. TextArray [ReadWrt_Dir]              ;; Array list of Drive/Directories to check 
  115. Text      [ReadWrt_Options]   :=     ;; <All> - Checks all known drives for Read/Write access
  116. Number    [ReadWrt_Rc]        :=     ;; 0  = All drives have Read/Write access/or selected dir
  117.                                      ;; >0 = Indicates one or more Drives/dirs do not have read/write  
  118. TextArray [ReadWrt_DirList]          ;; TextArray of Drive/Dirs not Read/Write
  119. Number    [ReadWrt_MaxIdx]    :=
  120. Number    [ReadWrt_Count]     := 
  121. Text      [ReadWrt_DirCheck]  :=
  122. Text      [ReadWrt_DirString] :=
  123.  
  124. ;; Variables: FSPCErr
  125. Number    [FSPCERR_Rc] := 0
  126.  
  127. ;; Variables: ReadWrtErr
  128. Number    [ReadWrtErr_Rc] := 0
  129.  
  130. ;; Variables: Parse
  131. Text      [Parse_Str]      :=              
  132. Text      [Parse_Text]     :=              
  133. Text      [Parse_Char]     :=              
  134. Number    [Parse_Count]    := 0            
  135. Number    [Parse_Len]      := 0            
  136. Number    [Parse_CharLen]  := 0           
  137. Number    [Parse_Pos1]     := 0           
  138. TextArray [Parse_Tokens]                     
  139.  
  140. Text      [Field_Error] := False
  141.  
  142. Number [Dialog_SysFile] := 0
  143. Text [WinDir] :=
  144. Text [PassThru_Switch] :=
  145. Text [GetIPVL_Dir] :=
  146. Text [New_Student] := No
  147. Text [StringS] := BlankString
  148. Text [Product_Version] := 
  149. Text [Product_CompanyName] := 
  150. Text [Product_DefaultGrp] := Emanuel Electronic Format
  151. Text [Product_DefaultDir] := C:\LNWin
  152. Text [System_StartTime] := 
  153. Text [System_CMDLine] := 
  154. Text [System_TempDir] := 
  155. Text [System_InstallType] :=
  156.  
  157. Text [PassThru_Switch1] :=
  158. TextArray [Product_List] 
  159. TextArray [Product_LstName] 
  160. TextArray [Product_LstSize] 
  161.  
  162. Number [Product_CB] := 0
  163. Number [Product_CB1] := 0
  164. TextArray [Product_LstCMDL] 
  165. Number [Product_Cnt1] := 0
  166. Text [TViewsDir] :=
  167. Text [Invalid_Views] :=
  168.  
  169. TextArray [Schools_List] 
  170. Number    [Schools_Total] := 0
  171. Number    [Schools_Cnt1] := 0
  172. Text      [Schools_Text] := 
  173. Text      [Schools_Name] :=
  174.  
  175.  
  176. Number [Dialog_Rc] := 0
  177. Text [GetIdir_IDir] := 
  178. Number [GetIDir_TQueSize] := 0
  179. Number [UniSys311_Rc] := 0
  180. Text [GetGroup_DefaultGrp] := 
  181. TextArray [InUse_FileName] 
  182.  
  183.  
  184. TextArray [InUse_BackUpN] 
  185. TextArray [InUse_AppName] 
  186. Number [InUse_RC] := 0
  187. Text [ISysFileB_LogFile] := 
  188. Text [IICons_Group] := 
  189. TextArray [Views31Dirs] 
  190. TextArray [RightsDirs]
  191. Text [Views31IDir] := 
  192. Text [viewsini] :=
  193. Text [ScanIcons_ExePath] := 
  194. Text [ScanIcons_Text] := 
  195. Text [ScanIcons_Directory] :=
  196. Text [Disk_Space_sRequired] := 
  197. Text [Text_1] :=
  198. Number [GradYear_Beg] := 0
  199. Number [GradYear_End] := 0
  200. TextArray [GradYear_List] 
  201. Number [Reg_OSFRb] := 
  202. Number [Reg_NumOSFRb] := 0
  203.  
  204. Text [StrCheck_String] := 
  205. Text [StrCheck_Valid] := 
  206. Number [StrCheck_Cnt] := 0
  207. Number [StrCheck_Rc] := 0
  208. Text [StrCheck_Char] := 
  209. Number [StrCheck_Chk] := 0
  210. Text [StrCheck_Mask] := 
  211. Number [StrCheck_Len] := 0
  212. Number [RegUser_Count] := 0
  213. TextArray [RegUser_Data] 
  214. Number [RegUser_Idx] := 0
  215. Number [Schools_AddCnt] := 0
  216. Text [RegUser1_Back] := 
  217. Text [ByeBye_Desc] :=
  218. Text [ByeBye_Desc1] :=
  219. Text [Student_Code] :=
  220. Text [Temp_Code] :=
  221. Text [Sub_First] :=
  222. Text [Sub_Last] :=
  223. Text [SysDate] :=
  224. Text [SDate] :=
  225.  
  226. Number [Reg_CBLawReview] :=
  227. Number [Reg_CBLawReview1] :=
  228. Text [RegH_Addr1] :=
  229. Text [RegH_Addr2] :=
  230. Text [RegH_City] :=
  231. Text [RegH_State] :=
  232. Text [RegH_Zip] :=
  233. Text [RegH_Phone] :=
  234.  
  235. Text [TRegH_Addr1] :=
  236. Text [TRegH_Addr2] :=
  237. Text [TRegH_City] :=
  238. Text [TRegH_State] :=
  239. Text [TRegH_Zip] :=
  240. Text [TRegH_Phone] :=
  241.  
  242. Text [Last_Screen] :=
  243.  
  244. Number [Last_Reg_CBLawReview] := 0
  245. Number [Last_Reg_CBLawReview1] := 0
  246. Text [Last_Reg_GradYear] := 
  247. Number [Credit_Rc] := 0
  248. Text [Student_Info] :=
  249. Text [Str1] := 
  250. Text [Str2] :=
  251. Number [S_Count] := 0
  252. Text [S_Text] :=
  253. Number [Call_Rc] := 0
  254. Text [Reg_Member] := 
  255. Text [Reg_InstallOS] := 
  256. Text [Reg_SoftwareVer] := 
  257. Text [Reg_ProductId] := 
  258. Text [TS_text] :=
  259. Text [Err_Desc] := 
  260. Text [Err_Text] :=
  261. Number [Dll_LdError] := 0
  262. Number [LdError] := 0
  263. Text [Exp_Month] := 
  264. TextArray [Exp_MonthLst] 
  265. TextArray [Exp_YearLst] 
  266. Text [Exp_Year] :=
  267. Text [Product_File] := 
  268. Number [L_Check] := 0
  269. Text [T_Desc] := 
  270. Text [CC_Text] := 
  271. Text [PI_Text] := 
  272. Text [Ist_Text] := 
  273. Text [Reg_DialPrefix] :=
  274. Number [Start_Err] := 0
  275. Text [Reg_SchoolIdX] :=
  276. Text [Price_Desc] := 
  277. Text [Price_Total] :=
  278. Text [Price_Return] := 
  279. Text [Dial_Prefix] :=
  280. Text [Reg_CBLawReview1Yn] := 
  281. Text [Reg_CBLawReviewYn] :=
  282. Text [Reg_CBLawReviewYn1] := 
  283. Text [C_Dir] := 
  284. Text [T_Dir] :=
  285. Number [KeySize] := 0
  286. Number [Error] := 0
  287. Text [Cat_Select] :=
  288. Number [BStr_Count] := 0
  289. Text [CMD_Line] :=
  290. Text [Install_Type] := 
  291. Number [Dialog_RbBookStore] := 0
  292. Number [Dialog_RbRStudent] := 0
  293. Text [BkSt_Code] := 
  294. Text [BkSt_Name] := 
  295. Text [SRef_Code] := 
  296. Text [SRef_Name] := 
  297. Text [SRef_School] := 
  298. Text [SRef_GradYear] :=
  299. Text [Scr_Disabled] := 
  300. Number [Dialog_RbYesNo] := 2
  301. Number [Dialog_RbYesNo1] := 2
  302. Text [Demo_Infobase_Title] := 
  303. Text [Demo_Infobase_File_Name] := 
  304. Text [ExeName] :=
  305. Text [Install_BViews] := 
  306. Text [System_Reboot] := 
  307.  
  308. Text [AddVshare_Installed] :=
  309. Number [AddVShare_FSize] := 0
  310. Number [AddVShare_SecLine] := 0
  311. TextArray [AddVShare_ModIni] 
  312. Number [AddVShare_ChkSec] := 0
  313. Text [AddVShare_FileName] := 
  314. Text [AddVShare_Ini] := 
  315. Text [AddVShare_Options] :=
  316. Number [AddVShare_Count] := 0
  317. Text [AddVShare_OText] :=
  318. Text [SRefCode_Disabled] :=
  319. Text [Bks_Disabled] :=
  320. Text [IDIR_BViews] := 
  321. Text [IDIR_Demo] := 
  322. Text [IDIR_Info] := 
  323. Text [IDIR_SDW] :=
  324. Text [KBytes] :=
  325. Text [FPFile_Name] := 
  326. Text [FPFile_CurDrive] := 
  327. Number [SSkip] := 0
  328. TextArray [FPFile_Dirs]
  329. EndDefineVariables
  330. Procedure SetUp
  331. ;;***************************************************************************
  332. ;; SetUp - Intializes instalit windows/colors/Ques support files into ShadowDirectory
  333. ;;
  334. ;; HPI - Leading the world in installation technology
  335. ;; ** Windows / Windows NT / OS2 / DOS / Client Server **
  336. ;; From the HPI script library 10/01/95 - CNH
  337. ;; ---------------------------------------------------------------------------------------------------------------
  338. ;; Description: SetUp 
  339. ;; The main function of setup is to properly intialize the system
  340. ;; for script execution. This includes the loading of bitmaps into
  341. ;; the shadowdirectory. 
  342. ;;
  343. ;; Compatiability: SetUp
  344. ;; Windows, Win95, NT installers only ! 
  345. ;;
  346. ;; Calling Convention: SetUp
  347. ;; Do SetUp     
  348. ;;
  349. ;; Return Codes: SetUp
  350. ;; None
  351. ;;
  352. ;; Variables: SetUp
  353. ;; As Required
  354. ;;
  355. ;;***************************************************************************
  356.  
  357.  
  358. SetBackGroundColor 0 0 255 0 0 0
  359. SetReadOnlyInquiry Off 
  360. SetReplacementInquiry Off
  361. SetDefaultBitMap Off
  362. ShowWindow Maximize
  363.  
  364. SetMouseCursor Wait
  365.  
  366. ;; All installation support files and bitmaps to temp dir
  367. ;;
  368. :SetUp_QueFiles
  369.  
  370. QueFileGroup 10 to ShadowDirectory
  371.  
  372. ;; Init vars from Cmdline parameters
  373. ;;
  374. ;; -P:Product name   ;; Info base file name
  375. ;; Must be last parameter on command line
  376. ;;
  377. [Number1] := PositionOf "-P:" In [System_CMDLine]
  378. If [Number1] > 0
  379.    [Number1] := [Number1] + 3
  380.    [String12] := SubStringOf [System_CMDLine] From [Number1] To End
  381.    [Number1] := PositionOf " " In [String12]
  382.    If [Number1] > 0 
  383.       DecrementNumber [Number1]
  384.       [String2] := SubStringOf [String12] From 1 To [Number1]
  385.      Else
  386.       [String2] := [String12]
  387.    EndIf
  388.    [String1] := [String2].
  389.    [CMD_Line] := Yes
  390.    [Reg_Media] := D
  391.  
  392.   Else
  393.    ;; Which product to install
  394.    ClearArray [Array1] 
  395.    [Array1] := FileListFromLibrary *.SDW    ;;NFO   
  396.    [Number1] := LastindexUsedFor [Array1]
  397.  
  398.    If [Number1] = 0    
  399.       [Product_File] := Not Selected
  400.       Do NoProducts
  401.      Else
  402.       [String1] := [Array1][1]
  403.    EndIf
  404.  
  405. EndIf
  406.  
  407. :Check_Idd
  408. SetTokenDelimiterTo .
  409. [Product_File] := Token 1 Of [String1]
  410.  
  411. If FileIsInLibrary [Product_File].IDD
  412.   Else     
  413.     Do NoProducts
  414.     Goto Check_Idd
  415. EndIf
  416.  
  417. ;;PopUp  [Product_File].IDD
  418.  
  419. QueFiles To ShadowDirectory
  420.   [Product_File].IDD
  421. EndQueFiles
  422.  
  423. ;; Check for FreeSpaceOnDrive 
  424. ClearArray [FSPChk_Dir]             ;; Clear old Array contents
  425. [FSPChk_Dir][1]  := ShadowDirectory ;; Drive/Directory to check 
  426. [FSPChk_Options] := BlankString     ;; <All> - Checks all drives for required freespace.
  427. Do FSPChk                           ;; <BlankString> - Checks for required freespace on a specified drive.
  428.  
  429. ;; Return Codes: FSPChk
  430. ;; [FSPChk_Rc]         :=     ;; 0  = All drives have adequate free space available.
  431. ;;                            ;; >0 = Indicates one or more Drives/dirs required freespace.
  432. ;; [FSPChk_MsgList][X] :=     ;; TextArray of Drive/Dirs with insufficent freespace.
  433.  
  434. Do FSPCErr
  435. If [FSPCErr_Rc] = 300 
  436.    Do ExitConfirm
  437. EndIf
  438.  
  439. If [FSPCErr_Rc] = 100
  440.    UnQueAllFiles   
  441.    Goto SetUp_QueFiles
  442. EndIf
  443.  
  444. :SetUp_ReadWrt
  445. ;; Calling Convention: ReadWrt
  446. [ReadWrt_Dir][1]  := ShadowDirectory ;; Drive/Directory to check 
  447. [ReadWrt_Options] := BlankString     ;; <BlankString> - Use if no option specified
  448.                                      ;; <All> - Checks all known drives for Read/Write access
  449. Do ReadWrt                           ;; Checks for required freespace on a specified drive.
  450.  
  451. ;; Return Codes:
  452. ;; [ReadWrt_Rc]         :=     ;; 0  = All drives have Read/Write access/or selected dir
  453. ;;                             ;; >0 = Indicates one or more Drives/dirs do not have read/write  
  454. ;; [ReadWrt_DirList][X] :=     ;; TextArray of Drive/Dirs not Read/Write
  455.  
  456. Do ReadWrtErr
  457. If [ReadWrtErr_Rc] = 300 
  458.    Do ExitConfirm
  459. EndIf
  460.  
  461. If [ReadWrtErr_Rc] = 100
  462.    Goto SetUp_ReadWrt
  463. EndIf
  464.  
  465. GetQuedFiles Quietly
  466.  
  467. ;; Display splash bitmap
  468. ;;
  469. LoadBitMap 15 ShadowDirectory\eman.Bmp eman1.Bmp
  470. ShowBitMap 15 @xy(1,1)
  471. UpdateWindow
  472.  
  473. ;; Load dialog bitmap
  474. ;;
  475. LoadBitMap 14 ShadowDirectory\elo.bmp
  476. ;;LoadBitMap 14 elo.bmp   ;; only use temporarly while testing
  477.  
  478. ;;ShowBitMap 14 @xy(1,1)
  479. ;;PopUp Hold...
  480.  
  481. SetBackGroundModeTo Transparent
  482. LoadBitMap 13 ShadowDirectory\OneM.Bmp
  483.  
  484.  
  485. [Number1] := SizeOfGroup 100
  486. If [Number1] > 0 .And. [Reg_Media] = BlankString
  487.    If DriveIsCdrom [InstallFromDrive]
  488.       [Reg_Media] := C
  489.      Else
  490.       [Reg_Media] := F
  491.    EndIf
  492.   Else
  493.    [Reg_Media] := D
  494. EndIf
  495.  
  496. ;;PopUp [Reg_Media]
  497.  
  498. ExamineTextFile ShadowDirectory\[Product_File].IDD
  499. [Product_ID] := SettingFor Product ID
  500. [Product_Name] := SettingFor Product Name
  501. [Version_Number] := SettingFor Version Number
  502. [Default_Program_Group] := SettingFor Default Program Group
  503. [Default_Directory_Name] := \ELO ;; SettingFor Default Directory Name
  504. [Infobase_Title] := SettingFor Infobase Title
  505. [Icon_Name] := SettingFor Icon Name
  506. [Infobase_File_Name] := SettingFor Infobase File Name
  507. [Shadow_File_Name] := SettingFor Shadow File Name
  508. [LDF_File_Name] := SettingFor LDF File Name
  509. [Price] := SettingFor Price
  510. [Dial_Number] := SettingFor Dial Number
  511. [Support_Number] := SettingFor Support Number
  512. [Disk_Space_Required] := SettingFor Disk Space Required
  513.  
  514. [Demo_Infobase_Title] := SettingFor Demo Infobase Title
  515. [Demo_Infobase_File_Name]  := SettingFor Demo Infobase File Name
  516. ForgetTextFile
  517. [Dial_Number] := 1-800-414-3221
  518. [Support_Number] := 1-800-EMANUEL
  519. [Orig_Dial_Number] := [Dial_Number]
  520. ;;PopUp [Disk_Space_Required]
  521. ;;DeleteFiles From ShadowDirectory Quietly
  522. ;; [Product_File].IDD
  523. ;;EndDeleteFiles
  524.  
  525. [Number20] := PositionOf "/" In [Default_Directory_Name]
  526. If [Number20] > 0
  527. [Parse_Str] := [Default_Directory_Name]
  528. [Parse_Char] := "/"
  529. Do Parse
  530.  
  531. [Number1] := 1
  532. [Number2] := [Parse_Count]
  533. [String1] := [Parse_Tokens][[Number1]]
  534. While [Number1] < [Number2]
  535.   IncrementNumber [Number1]
  536.   [String1] := [String1]\[Parse_Tokens][[Number1]]
  537. EndWhile
  538. [Default_Directory_Name] := [String1]
  539. EndIf
  540.  
  541. ;; Get Diskspace requirements
  542. ;;
  543. If [Reg_Media] = D
  544.    [Number1] := [Disk_Space_Required]
  545.    [Number2] := [Number1] / 2
  546.    [Number3] := [Number1] + [Number2]
  547.    [Disk_Space_Required] := [Number3]
  548. EndIf
  549.  
  550. ;;PopUp [Disk_Space_Required]
  551. ;;If [Disk_Space_Required] = 0 
  552. ;;   Do QueInstallFiles
  553. ;;   [Disk_Space_Required] := QueSize 
  554. ;;   UnQueAllFiles
  555. ;;   [Disk_Space_sRequired] := FormatNumber [Disk_Space_Required]
  556. ;;   [Number9] := [Disk_Space_Required] / 1000
  557. ;;   if [Number9] = 0 then 
  558. ;;        [KBytes] := <Unknown>
  559. ;;   else
  560. ;;[Number9] := [Disk_Space_Required] / 1024
  561. ;;[KBytes] := FormatNumber [Number9]
  562. ;;   EndIf
  563. ;;EndIf
  564.  
  565. SetCopyAttrTo 00
  566. CopyFiles From [InstallFromDirectory] To ShadowDirectory Quietly
  567. ZClient.Dll
  568. EndCopyFiles
  569.  
  570. EndProcedure
  571. Procedure GetRegData
  572.  
  573.  
  574. ;; ------------------------------
  575. ;; Findout if user registration form file exists
  576. ;;
  577.  
  578. If FileExists [WindowsDirectory]\ELForms.Dat
  579.    ;; Initialize required variables
  580.    ExamineTextFile [WindowsDirectory]\ELForms.Dat
  581.      [Student_Code]  := SettingFor Student
  582.      [Reg_FName]     := SettingFor FName
  583.      [Reg_LName]     := SettingFor LName
  584.      [Reg_MName]     := SettingFor MName
  585.      [Reg_Addr1]     := SettingFor Addr1
  586.      [Reg_Addr2]     := SettingFor Addr2
  587.      [Reg_City]      := SettingFor City
  588.      [Reg_State]     := SettingFor State
  589.      [Reg_Zip]       := SettingFor Zip
  590.      [Reg_Phone]     := SettingFor Phone
  591.      [RegH_Addr1]    := SettingFor RegH_Addr1
  592.      [RegH_Addr2]    := SettingFor RegH_Addr2
  593.      [RegH_City]     := SettingFor RegH_City
  594.      [RegH_State]    := SettingFor RegH_State
  595.      [RegH_Zip]      := SettingFor RegH_Zip
  596.      [RegH_Phone]    := SettingFor RegH_Phone
  597.      [SRef_Code]     := SettingFor SRef_Code
  598.      [SRef_Name]     := SettingFor SRef_Name
  599.      [SRef_School]   := SettingFor SRef_School
  600.      [Reg_SchoolId]  := SettingFor SchoolId
  601.      [BkSt_Name]     := SettingFor BookStore
  602.      [Reg_GradYear]  := SettingFor GradYear
  603.      [Reg_EMail]     := SettingFor EMail
  604.      [Reg_InstallOS] := SettingFor InstallOS
  605.  
  606.      [Reg_OSFRb]     := SettingFor OSFRB
  607.      [Reg_IAttempt]  := SettingFor IAttempt
  608.      [Exp_Month]     := SettingFor ExpMonth
  609.      [Exp_Year]      := SettingFor ExpYear
  610.      [Reg_SchoolIdX] := SettingFor RegSchoolIdX
  611.  
  612.    ForgetTextFile
  613.  
  614. EndIf 
  615.  
  616.    If [BkSt_Name] = UnKnown
  617.       [Reg_CBStore] := 1
  618.       [BkSt_Name] := BlankString
  619.    EndIf
  620.  
  621.    if [Student_Code] = BlankString
  622.       [New_Student] := Yes
  623.    else
  624.       [New_Student] := No
  625.    EndIf
  626.  
  627. EndProcedure
  628. Procedure ByeBye
  629.  
  630.  
  631.  
  632. ;;***************************************************************************
  633. ;;
  634. ;; Installation Exit Procedure
  635. ;;
  636. ;;***************************************************************************
  637. ;;Do ClearBmps
  638.  
  639. [String1] := CrcOfString [Reg_CCNo]
  640.  
  641. if [Install_Type] = Full 
  642.  
  643.  If FileExists [IDIR_Info]\Uninstal.inf
  644.    DeleteFiles From [IDIR_Info] Quietly
  645.      Uninstal.Inf
  646.    EndDeleteFiles
  647.  EndIf
  648.  
  649.  SetCopyAttrTo 00
  650.  CopyFiles From [InstallFromDirectory] To [IDIR_Info] Quietly
  651.     Uninstal.inf
  652.  EndCopyFiles
  653. endIf
  654.  
  655. ;;AppendFile [InstallFromDirectory]\Uninstal.Txt
  656. ;;Time=SystemDate
  657. ;;NfoBase=[Infobase_Title]
  658. ;;NFOBaseF=[IDIR_Info]\[Infobase_File_Name]
  659. ;;SDWBaseF=[IDIR_SDW]\[Shadow_File_Name]
  660. ;;IconName=[IICons_Group],[Icon_Name]
  661. ;;Pid=[Product_ID]
  662. ;;CC=[String1]
  663. ;;EndAppendFile
  664.  
  665. SetMouseCursor Arrow
  666.  
  667. [Reg_IAttempt] := S
  668. if [Install_Type] = Full 
  669.   ModifyTextFile [WindowsDirectory]\ELForms.Dat NoBackUp Quietly
  670.     AddOrChangeLineWith (IAttempt=,,) As "IAttempt=[Reg_IAttempt]" At End
  671.   EndModifyTextFile
  672. EndIf
  673.  
  674. ClearScreen
  675. :Exit
  676.  
  677. if [Install_Type] = Full
  678.    [ByeBye_Desc] := '[Infobase_Title]' has been successfully installed to '[InstallationDirectory]'. You may execute '[Product_Name]' from the program group '[IICons_Group]' by clicking the icon titled '[Icon_Name]'.
  679. Else
  680.    [ByeBye_Desc] := '[Infobase_Title]' has been successfully installed to '[InstallationDirectory]'. You may execute '[Product_Name]' from the program group '[IICons_Group]' by clicking the icon titled '[Icon_Name]'.
  681.    [ByeBye_Desc1] := Please feel free to pass along this demo version to all of your friends!
  682. EndIf
  683.  
  684. SetCompletionStatusTo Finished
  685.  
  686. DialogBox  @xy(center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader " Installation Complete "  ;;F:\VR\SCRIPTS\INSTTYPE.DBB
  687.   Font "MS Sans Serif" 8
  688.   BitMap @xy(8,7) BitMap 14
  689.   LText @xy(83,7) 197 50 "[ByeBye_Desc]"
  690.   LText @xy(83,60) 197 30 "IMPORTANT: You must close the LEXIS-NEXIS Millennium+ product infobase before running an Emanuel Electronic Format title."
  691.   LText @xy(83,110) 197 30 "[ByeBye_Desc1]"
  692.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  693.   PushButton @xy(230,145) 45 15 "Finish" 200
  694.   Static @xy(8,140) 269 1 "" BlackRect
  695. EndDialogBox
  696.  
  697. SoLong Quietly
  698.  
  699.  
  700. EndProcedure
  701. Procedure Parse
  702.  
  703. ;; Initialize Parse variables
  704. ClearArray [Parse_Tokens]
  705. [Parse_Count] := 0
  706. [Parse_Len] := LengthOf [Parse_Str]
  707. [Parse_Text] := [Parse_Str]
  708.  
  709. ;; Parse CharLen must be properly set to handle single of multi character
  710. ;; parse strings.
  711. [Parse_CharLen] := LengthOf [Parse_Char]
  712. IncrementNumber [Parse_CharLen] 
  713.  
  714. ;; Check text for parse characters
  715. :Parse_CheckTokens
  716. [Parse_Pos1] := PositionOf [Parse_Char] In [Parse_Text]
  717.  
  718. ;; Extract token and place in [Parse_Tokens] array
  719. If [Parse_Pos1] > 1
  720.    DecrementNumber [Parse_Pos1]
  721.    [String1] := SubStringOf [Parse_Text] From 1 to [Parse_Pos1]
  722.    IncrementNumber [Parse_Count]
  723.    [Parse_Tokens][[Parse_Count]] := [String1]
  724.    [Parse_Pos1] := [Parse_Pos1] + [Parse_CharLen]
  725.    [Parse_Text] := SubStringOf [Parse_Text] From [Parse_Pos1] To End
  726.    Goto Parse_CheckTokens
  727. EndIf
  728.  
  729. ;; A parse character in the first string position indicates
  730. ;; a null Token
  731. If [Parse_Pos1] = 1
  732.    [Number1] := LengthOf [Parse_Text]
  733.    IncrementNumber [Parse_Count]
  734.    [Parse_Tokens][[Parse_Count]] := BlankString
  735.    [Parse_Pos1] := [Parse_Pos1] + [Parse_CharLen]
  736.    DecrementNumber [Parse_Pos1]
  737.    [Parse_Text] := SubStringOf [Parse_Text] From [Parse_Pos1] To End
  738.    Goto Parse_CheckTokens
  739. EndIf
  740.  
  741. ;; Always set [Parse_Count] according the number of
  742. ;; tokens parsed, could possibly zero.
  743. [Parse_Count] := LastIndexUsedFor [Parse_Tokens]
  744. If [Parse_Count] = 0
  745.    ClearArray [Parse_Tokens]
  746.    Exit
  747. EndIf
  748.  
  749. ;; If some tokens were parsed, check string for trailing
  750. ;; tokens and to [Parse_Tokens] array.
  751. If [Parse_Pos1] = 0
  752.    [Number1] := LengthOf [Parse_Text] 
  753.    If [Number1] > 0
  754.      IncrementNumber [Parse_Count]
  755.      [Parse_Tokens][[Parse_Count]] := [Parse_Text]
  756.    EndIf
  757. EndIf
  758.  
  759.  
  760.  
  761.  
  762.  
  763. EndProcedure
  764. Procedure FSPChk
  765. ;;***************************************************************************
  766. ;; FSPChk - Checks all Drives/Dirs freespace against QueSize  
  767. ;;
  768. ;; HPI - Leading the world in installation technology
  769. ;; ** Windows / Windows NT / OS2 / DOS / Client Server **
  770. ;; From the HPI script library 09/25/95 - CNH
  771. ;; ---------------------------------------------------------------------------------------------------------------
  772. ;; Description: FSPChk 
  773. ;; Uses the Instalit function 'QueSizeForDrive' to determine if sufficent
  774. ;; free space is available on one or more drives. FSPChk will perform 
  775. ;; free space detection with a list of specified drives or directories,
  776. ;; or by using the 'All' option will automatically check all drives that
  777. ;; have files targeted for installation. FSPChk will return an array with
  778. ;; message information for any drives that fail free space requirements.
  779. ;;
  780. ;; Compatiability: FSPChk
  781. ;; Windows, Win95, NT installers only ! 
  782. ;;
  783. ;; Calling Convention: FSPChk
  784. ;; [FSPChk_Dir][X]  :=               ;; Drive/Directory to check 
  785. ;; [FSPChk_Options] := BlankString   ;; <BlankString> - Checks specified dirs for FreeSpace
  786. ;;                                   ;; <All> - OverRides specified dirs and checks Quesize
  787. ;;                                              for all targeted drives.
  788. ;; Do FSPChk                         ;; Checks for required freespace on a specified drive.
  789. ;;
  790. ;; Return Codes: FSPChk
  791. ;; [FSPChk_Rc]         :=     ;; 0  = All drives have adequate free space available.
  792. ;;                            ;; >0 = Indicates one or more Drives/dirs required freespace.
  793. ;; [FSPChk_MsgList][X] :=     ;; TextArray of Drive/Dirs with insufficent freespace.
  794. ;;
  795. ;; The array message format for [FSPChk_MsgList] is: 
  796. ;;
  797. ;; Drive_Letter: (nnnnnnbytes Qued) (nnnnnnbytes Free) (nnnnnnbytes required)
  798. ;; {QueSize} ----------^          
  799. ;; {Free Space on Drive} --------------------^
  800. ;; {Free Space Bytes Required to continue} ------------------------^
  801. ;;
  802. ;; Variables: FSPChk
  803. ;;        Text      [FSPChk_Options]    :=     
  804. ;;        Text      [FSPChk_DirCheck]   :=
  805. ;;        Text      [FSPChk_DirString]  := 
  806. ;;        Text      [FSPChk_Drive]      := 
  807. ;;        Text      [FSPChk_CurrentDir] := 
  808. ;;        Number    [FSPChk_Count1]     := 0
  809. ;;        Number    [FSPChk_FreeSpace]  := 0
  810. ;;        Number    [FSPChk_QueSize]    := 0
  811. ;;        Number    [FSPChk_Required]   := 0
  812. ;;        Number    [FSPChk_Rc]         :=     
  813. ;;        Number    [FSPChk_MaxIdx]     :=
  814. ;;        Number    [FSPChk_Count]      := 
  815. ;;        TextArray [FSPChk_MsgList] 
  816. ;;        TextArray [FSPChk_Dir]             
  817. ;;
  818. ;;***************************************************************************
  819.  
  820. [FSPChk_Count] := PositionOf All In [FSPChk_Options]
  821. If [FSPChk_Count] > 0
  822. ;; Option All
  823. [FSPChk_DirString] := B
  824. [FSPChk_Count]     := 0
  825. [FSPChk_Rc]        := 0
  826.  
  827. ClearArray [FSPChk_Dir]
  828. [FSPChk_MaxIdx] := LastIndexUsedFor [FSPChk_Dir]
  829.  
  830. While [FSPChk_DirString] < Z
  831.  IncrementString [FSPChk_DirString] 
  832.  
  833.  If DriveIsPresent [FSPChk_DirString]:\
  834.     If QueSizeForDrive [FSPChk_DirString] > 0   
  835.        IncrementNumber [FSPChk_MaxIdx]
  836.        [FSPChk_Dir][[FSPChk_MaxIdx]] := [FSPChk_DirString]:\
  837.     EndIf
  838.  EndIf
  839. EndWhile
  840.  
  841. EndIf
  842.  
  843. ;; Initialize Variables
  844. ;;GetMenuChoice
  845. ;;[FSPChk_Dir]
  846. ;;EndGetMenuChoice
  847.  
  848.  
  849. [FSPChk_MaxIdx] := LastIndexUsedFor [FSPChk_Dir]
  850. [FSPChk_Count]  := 0
  851. ClearArray [FSPChk_MsgList]
  852.  
  853. If [FSPChk_MaxIdx] = 0
  854.    Exit
  855. EndIf
  856.  
  857. While [FSPChk_Count] < [FSPChk_MaxIdx]
  858.  IncrementNumber [FSPChk_Count] 
  859.  [FSPChk_Drive]     := [FSPChk_Dir][[FSPChk_Count]]
  860.  
  861.  [FSPChk_DirCheck]  := SubStringOf [FSPChk_Drive] From 1 To 2
  862.  
  863.  [FSPChk_FreeSpace] := FreeSpaceOnDrive [FSPChk_DirCheck]
  864.  [FSPChk_QueSize]   := QueSizeForDrive [FSPChk_DirCheck]
  865.  [FSPChk_Required]  := [FSPChk_QueSize] - [FSPChk_FreeSpace]
  866.  
  867.  If [FSPChk_Required] < 0 
  868.    Else
  869.      [FSPChk_Count1] := 0 
  870.      While [FSPChk_Count1] < [FSPChk_Rc]
  871.        IncrementNumber [FSPChk_Count1]
  872.        [FSPChk_CurrentDir] := [FSPChk_MsgList][[FSPChk_Count1]]  
  873.        [FSPChk_Drive] := SubStringOf [FSPChk_CurrentDir] From 1 To 2
  874.                
  875.        If [FSPChk_DirCheck] = [FSPChk_Drive]
  876.           Goto FSPChk_Dir
  877.        EndIf
  878.      EndWhile
  879.  
  880.     IncrementNumber [FSPChk_Rc] 
  881.     [FSPChk_MsgList][[FSPChk_Rc]] := [FSPChk_DirCheck] ([FSPChk_FreeSpace] Free) ([FSPChk_Required] Additional bytes required)
  882.  
  883.  EndIf
  884.  
  885. :FSPChk_Dir
  886.  
  887. EndWhile
  888.  
  889.  
  890.  
  891. EndProcedure
  892. Procedure ReadWrt
  893. ;;***************************************************************************
  894. ;; ReadWrt - Checks for Read/Write Access on a drive/drives or directories 
  895. ;;
  896. ;; HPI - Leading the world in installation technology
  897. ;; ** Windows / Windows NT / OS2 / DOS / Client Server **
  898. ;; From the HPI script library 09/25/95 - CNH
  899. ;; ---------------------------------------------------------------------------------------------------------------
  900. ;; Description: ReadWrt 
  901. ;; Uses an array list to check one or more Directories for R/w access.
  902. ;; The <All> option can be used to scan all drives present. If the <ALL>
  903. ;; option is specified, any directories specified are ignored. ReadWrt
  904. ;; returns an array called [ReadWrt_DirList], and sets [ReadWrt_Rc] to
  905. ;; the number of invalid Drives/Directories found on the system.   
  906. ;;
  907. ;; Compatiability: ReadWrt
  908. ;; Windows, NT installers only ! 
  909. ;;
  910. ;; Calling Convention: ReadWrt
  911. ;; [ReadWrt_Dir][X]  :=               ;; Drive/Directory to check 
  912. ;; [ReadWrt_Options] := BlankString   ;; <BlankString> - Use if no option specified
  913. ;;                                    ;; <All> - Checks all known drives for Read/Write access
  914. ;; Do ReadWrt                         ;; Checks for required freespace on a specified drive.
  915. ;;
  916. ;; Return Codes:
  917. ;; [ReadWrt_Rc]         :=     ;; 0  = All drives have Read/Write access/or selected dir
  918. ;;                             ;; >0 = Indicates one or more Drives/dirs do not have read/write  
  919. ;; [ReadWrt_DirList][X] :=     ;; TextArray of Drive/Dirs not Read/Write
  920. ;;
  921. ;; Variables:
  922. ;; TextArray [ReadWrt_Dir]             ;; Array list of Drive/Directories to check 
  923. ;; Text      [ReadWrt_Options]  :=     ;; <All> - Checks all known drives for Read/Write access
  924. ;; Number    [ReadWrt_Rc]       :=     ;; 0  = All drives have Read/Write access/or selected dir
  925. ;;                                     ;; >0 = Indicates one or more Drives/dirs do not have read/write  
  926. ;; TextArray [ReadWrt_DirList]  :=     ;; TextArray of Drive/Dirs not Read/Write
  927. ;; Number    [ReadWrt_MaxIdx]   :=
  928. ;; Number    [ReadWrt_Count]    := 
  929. ;; Text      [ReadWrt_DirCheck] := 
  930. ;; 
  931. ;;***************************************************************************
  932. ClearArray [ReadWrt_DirList] 
  933. [ReadWrt_DirString] := B
  934. [ReadWrt_Count]     := 0
  935. [ReadWrt_Rc]        := 0
  936.  
  937. [ReadWrt_Count] := PositionOf TargetOnly In [ReadWrt_Options]
  938. If [ReadWrt_Count] > 0
  939. ;; Option All
  940. [ReadWrt_DirString] := B
  941. [ReadWrt_Count]     := 0
  942. [ReadWrt_Rc]        := 0
  943. ClearArray [ReadWrt_DirList] 
  944.  
  945. While [ReadWrt_DirString] < Z
  946.  IncrementString [ReadWrt_DirString] 
  947.  
  948.  If QueSizeForDrive [ReadWrt_DirString] > 0
  949.     If DirectoryAllowable [ReadWrt_DirString]:\
  950.       Else
  951.        IncrementNumber [ReadWrt_Rc]
  952.        [ReadWrt_DirList][[ReadWrt_Rc]] := [ReadWrt_DirString]:\
  953.     EndIf
  954.  EndIf
  955. EndWhile
  956.  
  957. Exit
  958. EndIf
  959.  
  960. [ReadWrt_Count] := PositionOf All In [ReadWrt_Options]
  961.  
  962. If [ReadWrt_Count] > 0
  963. ;; Option All
  964. [ReadWrt_DirString] := B
  965. [ReadWrt_Count]     := 0
  966. [ReadWrt_Rc]        := 0
  967. ClearArray [ReadWrt_DirList] 
  968.  
  969. While [ReadWrt_DirString] < Z
  970.  IncrementString [ReadWrt_DirString] 
  971.  
  972.  If DriveIsPresent [ReadWrt_DirString]:\
  973.     If DirectoryAllowable [ReadWrt_DirString]:\
  974.       Else
  975.        IncrementNumber [ReadWrt_Rc]
  976.        [ReadWrt_DirList][[ReadWrt_Rc]] := [ReadWrt_DirString]:\
  977.     EndIf
  978.  EndIf
  979. EndWhile
  980.  
  981. Exit
  982. EndIf
  983.  
  984. :ReadWrt_Check
  985. ;; Initialize Variables
  986. [ReadWrt_MaxIdx] := LastIndexUsedFor [ReadWrt_Dir]
  987. [ReadWrt_Count]  := 0
  988. ClearArray [ReadWrt_DirList]
  989.  
  990. ;; Check selected directories for Read/Write access
  991. While [ReadWrt_Count] < [ReadWrt_MaxIdx]
  992.  IncrementNumber [ReadWrt_Count] 
  993.  [ReadWrt_DirCheck] := [ReadWrt_Dir][[ReadWrt_Count]]
  994.  
  995.  If DirectoryAllowable [ReadWrt_DirCheck]
  996.    Else
  997.     IncrementNumber [ReadWrt_Rc]
  998.     [ReadWrt_DirList][[ReadWrt_Rc]] := [ReadWrt_DirCheck]
  999.  EndIf
  1000.  
  1001. EndWhile
  1002.  
  1003. EndProcedure
  1004.  
  1005.  
  1006. Procedure FSPCERR
  1007. ;;***************************************************************************
  1008. ;; FSPCErr - Displays an error dialog if FSPChk returns an error via [FSPChk_Rc]
  1009. ;;
  1010. ;; HPI - Leading the world in installation technology
  1011. ;; ** Windows / Windows NT / OS2 / DOS / Client Server **
  1012. ;; From the HPI script library 09/25/95 - CNH
  1013. ;; ---------------------------------------------------------------------------------------------------------------
  1014. ;; Description: FSPCErr 
  1015. ;; FSPCErr is called immediately following the FSPChk procedure. 
  1016. ;; If [FSPChk_Rc] is greater than zero, then FSPCErr will display
  1017. ;; an error dialog with the required information informing the 
  1018. ;; user that the installation directory has insufficient space 
  1019. ;; for product installation.
  1020. ;;
  1021. ;; Compatiability: FSPCErr
  1022. ;; Windows, Win95, NT installers only ! 
  1023. ;;
  1024. ;; Requires: FSPCErr
  1025. ;; Procedure  - FSPChk
  1026. ;;
  1027. ;; Calling Convention: FSPCErr
  1028. ;; Do FSPCErr                         ;; Checks to see if FSPChk has detected a freespace error
  1029. ;;
  1030. ;; Return Codes: FSPCErr
  1031. ;; If [FSPCErr_Rc] = 300              ;; User selected 'Cancel'  
  1032. ;;    Do ExitConfirm
  1033. ;; EndIf
  1034. ;;
  1035. ;; If [FSPCErr_Rc] = 100              ;; User selected 'Re-Try'
  1036. ;;    UnQueAllFiles   
  1037. ;;    Goto SetUp_QueFiles
  1038. ;; EndIf
  1039. ;;
  1040. ;; Variables: FSPCErr
  1041. ;; Number    [FSPCErr_Rc] 
  1042. ;;***************************************************************************
  1043. [FSPCErr_Rc] := 0
  1044.  
  1045. If [FSPChk_Rc] > 0
  1046.    ClearScreen
  1047.  
  1048.    [Number25] := RGB(0,0,0)           ;;custom foreground color
  1049.    [Number26] := RGB(192,192,192)     ;;custom background color
  1050.  
  1051. ;;   If FileExists ShadowDirectory\elo.bmp
  1052. ;;      LoadBitMap 14 ShadowDirectory\elo.bmp
  1053. ;;     Else
  1054. ;;      Quefiles To ShadowDirectory
  1055. ;;        elo.bmp
  1056. ;;      EndQueFiles
  1057. ;;      GetQuedFiles Quietly
  1058. ;;      LoadBitMap 14 ShadowDirectory\elo.bmp
  1059. ;;   EndIf
  1060.     
  1061.    UpdateWindow
  1062.  
  1063.    DialogBox  @xy(center,80) 284 165 Returns [FSPCERR_Rc] BlackOnLightGray UseHeader " Insufficient Free Space "  
  1064.       Font "MS Sans Serif" 8
  1065.       LText   @xy(84,7)  191 24 "Additional free space is required to continue installation. Please free up the required free space bytes and retry the installation."
  1066.       LText   @xy(84,37) 191 24 "Please see your 'Windows 3.1 File Manager' or 'Windows 95 Explorer' to delete any unneeded files to continue installation."
  1067.       LText   @xy(84,67) 191 23 "The following drive(s) have insufficient free space to continue installation."
  1068.       ListBox @xy(84,87) 191 33 Uses [String1] LoadWith [FSPChk_MsgList] Border 
  1069.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  1070.       PushButton @xy(180,145) 45 15 "Next >" 200 Disabled
  1071.       PushButton @xy(135,145) 45 15 "< Retry" 100 
  1072.       PushButton @xy(232,145)  45 15 "Cancel" 300
  1073.       Static @xy(8,140) 269 1 "" BlackRect
  1074.    EndDialogBox
  1075.  
  1076.    If [FSPCERR_Rc] = 300
  1077.       SoLong Quietly
  1078.    EndIf
  1079.  
  1080. EndIf
  1081.  
  1082. EndProcedure
  1083. Procedure ReadWrtErr
  1084. ;;***************************************************************************
  1085. ;; ReadWrtErr - Displays an error dialog if ReadWrtCHk returns an error via [ReadWrtChk_Rc]
  1086. ;;
  1087. ;; HPI - Leading the world in installation technology
  1088. ;; ** Windows / Windows NT / OS2 / DOS / Client Server **
  1089. ;; From the HPI script library 09/25/95 - CNH
  1090. ;; ---------------------------------------------------------------------------------------------------------------
  1091. ;; Description: ReadWrtErr 
  1092. ;; ReadWrtErr is called immediately following the ReadWrtChk procedure. 
  1093. ;; If [ReadWrtChk_Rc] is greater than zero, then ReadWrtErr will display
  1094. ;; an error dialog with the required information informing the 
  1095. ;; user that the installation directory has insufficient space 
  1096. ;; for product installation.
  1097. ;;
  1098. ;; Compatiability: ReadWrtErr
  1099. ;; Windows, Win95, NT installers only ! 
  1100. ;;
  1101. ;; Requires: ReadWrtErr
  1102. ;; Procedure  - ReadWrtChk
  1103. ;;
  1104. ;; Calling Convention: ReadWrtErr
  1105. ;; Do ReadWrtErr                         ;; Checks to see if ReadWrtChk has detected a freespace error
  1106. ;;
  1107. ;; Return Codes: ReadWrtErr
  1108. ;; If [ReadWrtErr_Rc] = 300              ;; User selected 'Cancel'  
  1109. ;;    Do ExitConfirm
  1110. ;; EndIf
  1111. ;;
  1112. ;; If [ReadWrtErr_Rc] = 100              ;; User selected 'Re-Try'
  1113. ;;    UnQueAllFiles   
  1114. ;;    Goto SetUp_QueFiles
  1115. ;; EndIf
  1116. ;;
  1117. ;; Variables: ReadWrtErr
  1118. ;; Number    [ReadWrtErr_Rc] 
  1119. ;;***************************************************************************
  1120.  
  1121. If [ReadWrt_Rc] > 0
  1122.  
  1123.    [Number25] := RGB(0,0,0)           ;;custom foreground color
  1124.    [Number26] := RGB(192,192,192)     ;;custom background color
  1125.  
  1126. ;;   If FileExists ShadowDirectory\elo.bmp
  1127. ;;      LoadBitMap 14 ShadowDirectory\elo.bmp
  1128. ;;     Else
  1129. ;;      Quefiles To ShadowDirectory
  1130. ;;        elo.bmp
  1131. ;;      EndQueFiles
  1132. ;;      GetQuedFiles Quietly
  1133. ;;      LoadBitMap 14 ShadowDirectory\elo.bmp
  1134. ;;   EndIf
  1135.     
  1136.    UpdateWindow
  1137.     
  1138.    DialogBox  @xy(center,80) 284 165 Returns [ReadWrtErr_Rc] BlackOnLightGray UseHeader " Directory Access Denied " 
  1139.       Font "MS Sans Serif" 8
  1140.       LText   @xy(84,7)  191 44 "During installation one or more directories did not have adequate Read/Write privileges. Read/Write access will be required for the specified directories as listed below before continuing installation."
  1141.       LText   @xy(84,47) 191 24 "Please see your systems administrator concerning access privileges."
  1142.       LText   @xy(84,77) 191 23 "The following directories do not have Read/Write access or are invalid."
  1143.       ListBox @xy(84,97) 191 33 Uses [String1] LoadWith [ReadWrt_DirList] Border
  1144.  
  1145.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  1146.       PushButton @xy(180,145) 45 15 "Next >" 200 Disabled
  1147.       PushButton @xy(135,145) 45 15 "< Retry" 100 
  1148.       PushButton @xy(232,145)  45 15 "Cancel" 300
  1149.       Static @xy(8,140) 269 1 "" BlackRect
  1150.    EndDialogBox
  1151.  
  1152.  
  1153.    If [ReadWrtErr_Rc] = 300
  1154.       SoLong Quietly
  1155.    EndIf
  1156.  
  1157.  
  1158. EndIf
  1159.  
  1160.  
  1161. EndProcedure
  1162. Procedure ExitProcedure
  1163. ;;PopUp Exit
  1164.  
  1165. ModifyTextFile [WindowsDirectory]\ELForms.Dat NoBackUp Quietly
  1166.   AddOrChangeLineWith (CCNo=,,) As "CCNo=Deleted" At End
  1167.   AddOrChangeLineWith (ExpDate=,,) As "ExpDate=Deleted" At End
  1168. EndModifyTextFile
  1169.  
  1170. :ExitInit_Dll
  1171. [LdError] := 0
  1172. If FileExists ShadowDirectory\ZClient.Dll 
  1173. [String1] := ShadowDirectory\ZClient.Dll 
  1174. If FileIsInUse [String1]
  1175.    If [LdError] < 5
  1176.       IncrementNumber [LdError]
  1177.       LoadDll [Dll1] ShadowDirectory\ZClient.Dll 
  1178.       CallDll [Dll1] Terminate() Returns short [Call_Rc]
  1179.       UnLoadDll [Dll1]
  1180.       Goto ExitInit_Dll
  1181.    EndIf
  1182. EndIf
  1183. EndIf
  1184.  
  1185. DeleteFiles from ShadowDirectory Quietly
  1186. Default.Bmp
  1187. elo.bmp
  1188. EMan.Bmp
  1189. EMan1.Bmp
  1190. LName.Ini
  1191. OneM.Bmp
  1192. School.Dat
  1193. School.Idx
  1194. STRef.Txt
  1195. Uni1.Bmp
  1196. ZCLient.DLL
  1197. [Product_File].IDD
  1198. Ctl3dv2.Dll
  1199. VShare.386
  1200. EndDeleteFiles
  1201.  
  1202.  
  1203. EndProcedure
  1204. Procedure CB_Check1
  1205. ;; *******************************************
  1206. If [Number10] = 1 .And. [Num10] = NoCharacter
  1207.    
  1208.    ;; Total Bytes
  1209.    [Number20]  := [String20]
  1210.    [Number31]  := [String31]
  1211.    [Number30]  := [Number20] + [Number31]
  1212.    [String31]  := [Number30]
  1213.   
  1214.    [Num10] := YesCharacter
  1215.  
  1216.    UpdateWindow ProdSelectDB
  1217. EndIf
  1218.  
  1219. If [Number10] = 0 .And. [Num10] = YesCharacter
  1220.  
  1221.    ;; Total Bytes
  1222.    [Number20]  := [String20]
  1223.    [Number31]  := [String31]
  1224.    [Number30]  := [Number31] - [Number20]
  1225.    [String31]  := [Number30]
  1226.  
  1227.    [Num10] := NoCharacter
  1228.  
  1229.    UpdateWindow ProdSelectDB
  1230. EndIf
  1231.  
  1232. ;; *******************************************
  1233. If [Number11] = 1 .And. [Num11] = NoCharacter
  1234.    
  1235.    ;; Total Bytes
  1236.    [Number21]  := [String21]
  1237.    [Number31]  := [String31]
  1238.    [Number30]  := [Number21] + [Number31]
  1239.    [String31]  := [Number30]
  1240.   
  1241.    [Num11] := YesCharacter
  1242.  
  1243.    UpdateWindow ProdSelectDB
  1244.  
  1245. EndIf 
  1246. If [Number11] = 0 .And. [Num11] = YesCharacter
  1247.  
  1248.    ;; Total Bytes
  1249.    [Number20]  := [String21]
  1250.    [Number31]  := [String31]
  1251.    [Number30]  := [Number31] - [Number21]
  1252.    [String31]  := [Number30]
  1253.  
  1254.    [Num11] := NoCharacter
  1255.  
  1256.    UpdateWindow ProdSelectDB
  1257. EndIf
  1258.  
  1259. ;; *******************************************
  1260. If [Number12] = 1 .And. [Num12] = NoCharacter
  1261.    
  1262.  
  1263.    ;; Total Bytes
  1264.    [Number21]  := [String22]
  1265.    [Number31]  := [String31]
  1266.    [Number30]  := [Number21] + [Number31]
  1267.    [String31]  := [Number30]
  1268.   
  1269.    [Num12] := YesCharacter
  1270.  
  1271.    UpdateWindow ProdSelectDB
  1272.  
  1273. EndIf 
  1274. If [Number12] = 0 .And. [Num12] = YesCharacter
  1275.  
  1276.    ;; Total Bytes
  1277.    [Number22]  := [String22]
  1278.    [Number31]  := [String31]
  1279.    [Number30]  := [Number31] - [Number22]
  1280.    [String31]  := [Number30]
  1281.  
  1282.    [Num12] := NoCharacter
  1283.  
  1284.    UpdateWindow ProdSelectDB
  1285. EndIf
  1286.  
  1287. ;; *******************************************
  1288. If [Number13] = 1 .And. [Num13] = NoCharacter
  1289.    
  1290.    ;; Total Bytes
  1291.    [Number23]  := [String23]
  1292.    [Number31]  := [String31]
  1293.    [Number30]  := [Number23] + [Number31]
  1294.    [String31]  := [Number30]
  1295.   
  1296.    [Num13] := YesCharacter
  1297.  
  1298.    UpdateWindow ProdSelectDB
  1299.  
  1300. EndIf 
  1301. If [Number13] = 0 .And. [Num13] = YesCharacter
  1302.  
  1303.    ;; Total Bytes
  1304.    [Number20]  := [String23]
  1305.    [Number31]  := [String31]
  1306.    [Number30]  := [Number31] - [Number23]
  1307.    [String31]  := [Number30]
  1308.  
  1309.    [Num13] := NoCharacter
  1310.  
  1311.    UpdateWindow ProdSelectDB
  1312. EndIf
  1313.  
  1314. ;; *******************************************
  1315. If [Number14] = 1 .And. [Num14] = NoCharacter
  1316.    
  1317.    ;; Total Bytes
  1318.    [Number24]  := [String24]
  1319.    [Number31]  := [String31]
  1320.    [Number30]  := [Number24] + [Number31]
  1321.    [String31]  := [Number30]
  1322.   
  1323.    [Num14] := YesCharacter
  1324.  
  1325.    UpdateWindow ProdSelectDB
  1326.  
  1327. EndIf 
  1328. If [Number14] = 0 .And. [Num14] = YesCharacter
  1329.  
  1330.    ;; Total Bytes
  1331.    [Number24]  := [String24]
  1332.    [Number31]  := [String31]
  1333.    [Number30]  := [Number31] - [Number24]
  1334.    [String31]  := [Number30]
  1335.  
  1336.    [Num14] := NoCharacter
  1337.  
  1338.    UpdateWindow ProdSelectDB
  1339. EndIf
  1340.  
  1341. ;; *******************************************
  1342. If [Number15] = 1 .And. [Num15] = NoCharacter
  1343.    
  1344.    ;; Total Bytes
  1345.    [Number25]  := [String25]
  1346.    [Number31]  := [String31]
  1347.    [Number30]  := [Number25] + [Number31]
  1348.    [String31]  := [Number30]
  1349.   
  1350.    [Num15] := YesCharacter
  1351.  
  1352.    UpdateWindow ProdSelectDB
  1353.  
  1354. EndIf 
  1355. If [Number15] = 0 .And. [Num15] = YesCharacter
  1356.  
  1357.    ;; Total Bytes
  1358.    [Number25]  := [String25]
  1359.    [Number31]  := [String31]
  1360.    [Number30]  := [Number31] - [Number25]
  1361.    [String31]  := [Number30]
  1362.  
  1363.    [Num15] := NoCharacter
  1364.  
  1365.    UpdateWindow ProdSelectDB
  1366. EndIf
  1367.  
  1368.  
  1369.  
  1370. EndProcedure
  1371. Procedure PSelect1
  1372. SetTokenDelimiterTo ,
  1373. ExamineTextFile ShadowDirectory\PLst.Ini
  1374.   [String1]  := LineWith (CiteRite,,)
  1375.   [String10] := Token 2 Of [String1]
  1376.   [String20]  := SizeOfGroup 100
  1377.  
  1378.   [String1]  := LineWith (Full Authority,,)
  1379.   [String11] := Token 2 Of [String1]
  1380.   [String21]  := SizeOfGroup 200
  1381.  
  1382.   [String1]  := LineWith (CompareRite,,)
  1383.   [String12] := Token 2 Of [String1]
  1384.   [String22]  := SizeOfGroup 300
  1385.  
  1386.   [String1]  := LineWith (Hot Docs for Word,,)
  1387.   [String13] := Token 2 Of [String1]
  1388.   [String23]  := SizeOfGroup 400
  1389.  
  1390.   [String1]  := LineWith (Hot Docs for Word Perfect,,)
  1391.   [String14] := Token 2 Of [String1]
  1392.   [String24]  := SizeOfGroup 500
  1393.  
  1394.   [String1]  := LineWith (Internet Companion,,)
  1395.   [String15] := Token 2 Of [String1]
  1396.   [String25]  := SizeOfGroup 600
  1397. ForgetTextFile
  1398.  
  1399.    DialogBox ProdSelectDB @xy(CenterScreen,CenterScreen) 273 136 Returns [Dialog_rc] [Number25]On[Number26] UseHeader "Emanuel Electronic Format Product Selection" 
  1400.       Font "MS Sans Serif" 8
  1401.       LText @xy(8,4) 74 10 "Product Selection"
  1402.       LText @xy(208,4) 53 10 "Bytes Required"
  1403.  
  1404.       CheckBox CB_CiteRite     ProcIs CB_Check1 @xy(8,18) 117 12 "Cite Rite"                 Uses [Number10] LeftText
  1405.       CheckBox CB_FullAthority ProcIs CB_Check1 @xy(8,30) 117 12 "Full Authority"            Uses [Number11] LeftText
  1406.       CheckBox CB_CompareRite  ProcIs CB_Check1 @xy(8,41) 117 12 "CompareRite"               Uses [Number12] LeftText
  1407.       CheckBox HD_W            ProcIs CB_Check1 @xy(8,52) 117 12 "Hot Docs for Word"         Uses [Number13] LeftText
  1408.       CheckBox HD_WP           ProcIs CB_Check1 @xy(8,63) 117 12 "Hot Docs for Word Perfect" Uses [Number14] LeftText
  1409.       CheckBox HD_IComp        ProcIs CB_Check1 @xy(8,74) 117 12 "Internet Companion"        Uses [Number15] LeftText
  1410.  
  1411.       EditText @xy(208,18) 51 12 Uses [String20] Border ReadOnly
  1412.       EditText @xy(208,30) 51 12 Uses [String21] Border ReadOnly
  1413.       EditText @xy(208,41) 51 12 Uses [String22] Border ReadOnly
  1414.       EditText @xy(208,52) 51 12 Uses [String23] Border ReadOnly
  1415.       EditText @xy(208,63) 51 12 Uses [String24] Border ReadOnly
  1416.       EditText @xy(208,74) 51 12 Uses [String25] Border ReadOnly
  1417.  
  1418.       StaticText @xy(104,92) 35 10 "Totals"
  1419.       EditText @xy(208,92) 53 12 Uses [String31]
  1420.  
  1421.       PushButton @xy(196,114) 69 15 "Continue" 100
  1422.       PushButton @xy(120,114) 69 15 "< Back" 200
  1423.  
  1424.    EndDialogBox
  1425.  
  1426.  
  1427. EndProcedure
  1428. Procedure Launch
  1429. ;; **********************************
  1430. ;; Launch Product #1
  1431. ;;
  1432. If [Number10] = 1
  1433.    
  1434.    If OsErrorCode <> 0 .Or. OsExitCode <> 0
  1435.       PopUp Error=OSErrorCode ReturnCode=ExitCode
  1436.    EndIf
  1437.  
  1438. EndIf
  1439.  
  1440. ;; **********************************
  1441. ;; Launch Product #2
  1442. ;;
  1443. If [Number11] = 1
  1444.    
  1445.    PopUp #2 Run
  1446.  
  1447.    If OsErrorCode <> 0 .Or. OsExitCode <> 0
  1448.       PopUp Error=OSErrorCode ReturnCode=ExitCode
  1449.    EndIf
  1450.  
  1451. EndIf
  1452.  
  1453. ;; **********************************
  1454. ;; Launch Product #3
  1455. ;;
  1456. If [Number12] = 1
  1457.    
  1458.    PopUp #3 Run
  1459.  
  1460.    If OsErrorCode <> 0 .Or. OsExitCode <> 0
  1461.       PopUp Error=OSErrorCode ReturnCode=ExitCode
  1462.    EndIf
  1463.  
  1464. EndIf
  1465.  
  1466. ;; **********************************
  1467. ;; Launch Product #4
  1468. ;;
  1469. If [Number13] = 1
  1470.    
  1471.    PopUp #4 Run
  1472.  
  1473.    If OsErrorCode <> 0 .Or. OsExitCode <> 0
  1474.       PopUp Error=OSErrorCode ReturnCode=ExitCode
  1475.    EndIf
  1476.  
  1477. EndIf
  1478.  
  1479.  
  1480. ;; **********************************
  1481. ;; Launch Product #5
  1482. ;;
  1483. If [Number14] = 1
  1484.    
  1485.    PopUp #5 Run
  1486.  
  1487.    If OsErrorCode <> 0 .Or. OsExitCode <> 0
  1488.       PopUp Error=OSErrorCode ReturnCode=ExitCode
  1489.    EndIf
  1490.  
  1491. EndIf
  1492.  
  1493. EndProcedure
  1494. Procedure DemoInstall
  1495.  
  1496. ;; ************************************************************************
  1497. ;;
  1498. ;; Demo Install Option
  1499. ;;
  1500. ;; ************************************************************************
  1501.  
  1502. TextOut OnBitMap 13 @xy(60,17) Demo Install ;; this is a placeholder for demo install
  1503.  
  1504. EndProcedure
  1505. Procedure FullInstall
  1506. ;;***************************************************************************
  1507. ;;
  1508. ;; Full Install Option
  1509. ;;
  1510. ;;***************************************************************************
  1511. ;;
  1512.  
  1513. SetMouseCursor Wait
  1514.  
  1515. [PassThru_Switch1] := Back
  1516.  
  1517. [System_InstallType] := Full
  1518.  
  1519. :Full_InstallDirExists
  1520. :Full_InstallInit
  1521. UnQueAllFiles
  1522.  
  1523. SetInstallModeTo Install
  1524.  
  1525. if [Install_Bviews] = Yes
  1526.    Do QueBViews               ;; QueBviews pvl file
  1527. EndIf
  1528.  
  1529. if [Install_Type] = Demo
  1530.    Do QueDemoFiles
  1531. EndIf
  1532.  
  1533. if [Install_Type] = Full
  1534.    Do QueInstallFiles
  1535.  
  1536.    SetCopyAttrTo 00
  1537.    CopyFiles From [InstallFromDirectory] To [IDIR_Info] Quietly
  1538.       Uninstal.inf
  1539.    EndCopyFiles
  1540.  
  1541. EndIf
  1542.  
  1543. UnLoadBitMap 13
  1544. LoadBitMap 13 ShadowDirectory\OneM.Bmp
  1545.  
  1546. If [Install_Type] = Demo 
  1547. ShowBitMap 13 @xy(Center,Center)
  1548. TextOut OnBitMap 13 @xy(60,17) Verifying system requirements...
  1549.  
  1550. ;; Check for FreeSpaceOnDrive 
  1551. ClearArray [FSPChk_Dir]             ;; Clear old Array contents
  1552. ;;[FSPChk_Dir][1]  := BlankString   ;; Drive/Directory to check 
  1553. [FSPChk_Options] := All             ;; <All> - Checks all drives for required freespace.
  1554. Do FSPChk                           ;; <BlankString> - Checks for required freespace on a specified drive.
  1555.  
  1556. ;; Return Codes: FSPChk
  1557. ;; [FSPChk_Rc]         :=     ;; 0  = All drives have adequate free space available.
  1558. ;;                            ;; >0 = Indicates one or more Drives/dirs required freespace.
  1559. ;; [FSPChk_MsgList][X] :=     ;; TextArray of Drive/Dirs with insufficent freespace.
  1560.  
  1561. Do FSPCErr
  1562. If [FSPCErr_Rc] = 300 
  1563.    Do ExitConfirm
  1564. EndIf
  1565.  
  1566. If [FSPCErr_Rc] = 100
  1567.    UnQueAllFiles   
  1568.    ClearScreen
  1569.    Goto Full_InstallInit
  1570. EndIf
  1571.  
  1572. :SetUp_ReadWrt
  1573. ;; Calling Convention: ReadWrt
  1574. [ReadWrt_Dir][1]  := BlankString     ;; Drive/Directory to check 
  1575. [ReadWrt_Options] := TargetOnly      ;; <BlankString> - Use if no option specified
  1576.                                      ;; <All> - Checks all known drives for Read/Write access
  1577. Do ReadWrt                           ;; Checks for required read / write access
  1578. ;; Return Codes:
  1579. ;; [ReadWrt_Rc]         :=     ;; 0  = All drives have Read/Write access/or selected dir
  1580. ;;                             ;; >0 = Indicates one or more Drives/dirs do not have read/write  
  1581. ;; [ReadWrt_DirList][X] :=     ;; TextArray of Drive/Dirs not Read/Write
  1582.  
  1583. Do ReadWrtErr
  1584. If [ReadWrtErr_Rc] = 300 
  1585.    Do ExitConfirm
  1586. EndIf
  1587.  
  1588. If [ReadWrtErr_Rc] = 100
  1589.    ClearScreen
  1590.    Goto Full_InstallInit
  1591. EndIf
  1592.  
  1593. ClearScreen
  1594. HideBitMap 13
  1595. Delay 1
  1596. EndIf
  1597.  
  1598. GetQuedFiles
  1599.  
  1600. If [Install_Bviews] = Yes
  1601. [String1] := [InstallFromDirectory]
  1602. [InstallFromDirectory] := [InstallationDirectory]\BViews
  1603. InstallSeries BViews.Pvl
  1604. QueFileGroup 21 To [InstallationDirectory]\BViews
  1605. QueFileGroup 22 To ShadowDirectory
  1606. GetQuedFiles
  1607. DeleteFiles From [InstallationDirectory]\BViews Quietly
  1608. BViews.Pvl
  1609. EndDeleteFiles
  1610. [InstallFromDirectory] := [String1]
  1611. EndIf
  1612.  
  1613. SetMouseCursor Arrow
  1614.  
  1615.  
  1616.  
  1617. EndProcedure
  1618. Procedure Getgroup
  1619. ;;***************************************************************************
  1620. ;; GetGroup - Displays current list of all Programgroups and automatically sets
  1621. ;;            the default program group into the list if needed.
  1622. ;;
  1623. ;; HPI - Leading the world in installation technology
  1624. ;; ** Windows / Windows NT / OS2 / DOS / Client Server **
  1625. ;; From the HPI script library 09/25/95 - CNH
  1626. ;; ---------------------------------------------------------------------------------------------------------------
  1627. ;; Description: GetGroup 
  1628. ;;
  1629. ;; Compatiability: GetGroup
  1630. ;; Windows, NT installers only ! 
  1631. ;;
  1632. ;; Calling Convention: GetGroup
  1633. ;; [GetGroup_DefaultGrp] :=            ;; Specified default group
  1634. ;; Do GetGroup                         ;; Calls GetGroup
  1635. ;;
  1636. ;; Return Codes:
  1637. ;; [GetGroup_Select]                   ;; Group name as selected by user
  1638. ;;
  1639. ;; Variables:
  1640. ;; Number    [GetGroup_Idx] := 0
  1641. ;; Number    [GetGroup_InfoIdx] := 0
  1642. ;; TextArray [GetGroup_Name] 
  1643. ;; TextArray [GetGroup_Info] 
  1644. ;; Text      [GetGroup_Select] := 
  1645. ;; Text      [GetGroup_DefaultGrp] := 
  1646. ;; Text      [GetIdir_Idir] := 
  1647. ;; Text      [GetGroup_InputGrp] := 
  1648. ;; Text      [GetGroup_Input] := 
  1649. ;; Text      [CPDir] := 
  1650. ;; 
  1651. ;;***************************************************************************
  1652.  
  1653. ;; Get a list of all Group Names
  1654. ClearArray [GetGroup_Name] 
  1655. [GetGroup_Name]        := GetProgramManagerGroupNames
  1656. [GetGroup_Idx]         := LastIndexUsedFor [GetGroup_Name] 
  1657. [GetGroup_Select]      := [GetGroup_DefaultGrp]
  1658. If [GetGroup_InputGrp] = BlankString
  1659.    [GetGroup_InputGrp] := [GetGroup_DefaultGrp]
  1660. EndIf  
  1661.  
  1662. ;; Check and see if default group already exists, if not add it as an option        
  1663. ClearArray [GetGroup_Info] 
  1664. [GetGroup_Idx] := 0        
  1665. [GetGroup_Info] := GetProgramManagerGroupInfo [GetGroup_InputGrp]
  1666. [GetGroup_InfoIdx] := LastIndexUsedFor [GetGroup_Info]
  1667. If [GetGroup_InfoIdx] = 0
  1668.    IncrementNumber [GetGroup_Idx] 
  1669.    [GetGroup_Name][[GetGroup_Idx]] := [GetGroup_InputGrp]
  1670. EndIf
  1671.  
  1672. ;; Prompt user for new program group name
  1673. DialogBox  @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader "Select Program Group"  ;;F:\VR\SCRIPTS\PROGROUP.DBB
  1674.       Font "MS Sans Serif" 8
  1675.       BitMap @xy(8,7) BitMap 14
  1676.       Static @xy(8,140) 269 1 "" BlackRect
  1677.       PushButton @xy(180,145) 45 15 "Next >" 200
  1678.       PushButton @xy(136,145) 45 15 "< &Back" 100
  1679.       PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  1680.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  1681.       LText @xy(84,7) 189 40 "An icon for the electronic materials you are currently installing will be created. The default group is Emanuel Law Outlines. You may select another group or enter a new one in the list box below."
  1682.       LText @xy(84,52) 59 12 "Existing Groups:"
  1683.       ComboBox @xy(84,62) 191 70 Uses [GetGroup_InputGrp] LoadWith [GetGroup_Name] Border Sort
  1684. EndDialogBox
  1685.  
  1686. :GetGroup_Eoj
  1687.  
  1688. If [Dialog_Rc] = 300
  1689.    Do ExitConfirm
  1690. EndIf
  1691.  
  1692. EndProcedure
  1693. Procedure GetIDir
  1694.  
  1695. :Goto GetIDir_GetDir
  1696. UnQueAllFiles
  1697. If [Install_Type] = Demo             
  1698.    Do QueDemoFiles                             ;; Demo Dir files 
  1699.    Do QueBViews
  1700.    [Number3] := QueSize + 6000000
  1701. ;;   [Disk_Space_Required] := [Number1]
  1702. EndIf
  1703.  
  1704. If [Install_Type] = Full
  1705.    Do QueBViews
  1706.    [Number1] := QueSize 
  1707.    [Number2] := [Disk_Space_Required]
  1708.    [Number3] := [Number1] + [Number2] + 6000000
  1709. ;;   [Disk_Space_Required] := [Number3]
  1710. EndIf
  1711. UnQueAllFiles
  1712.  
  1713. [GetIDir_TQueSize] := [Number3]
  1714.  
  1715. [String1] := SubStringOf [GetIdir_IDir] From 4 to End
  1716. DetermineInstallationDrive [GetIDir_TQueSize] RequireFixed AllowSingleSelection 
  1717. DetermineInstallationDirectory InstallationDrive:\[String1] RequireFixed NoCreate
  1718.  
  1719. [GetIdir_IDir] := [InstallationDirectory]
  1720.  
  1721. ;;;; Check for a vaild directory
  1722. ;;If DirectoryAllowable [InstallationDirectory]
  1723. ;;   Exit    
  1724. ;;EndIf
  1725. ;;
  1726. ;;:GetIDir_NotAllowable
  1727. ;;[String19] := BlankString
  1728. ;;[Number25] := RGB(0,64,128)     ;;custom foreground color
  1729. ;;DialogBox  @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader " Directory not allowable "  ;;F:\VR\SCRIPTS\CUSTOM.DBB
  1730. ;;  Font "MS Sans Serif" 8
  1731. ;;  BitMap @xy(8,7) BitMap 14 ;;  GroupBox @xy(8,185) 269 1 ""
  1732. ;;  PushButton @xy(135,145) 45 15 "< &Back" 100
  1733. ;;  PushButton @xy(180,145) 45 15 "Next >" 200 Disabled
  1734. ;;  PushButton @xy(232,145) 45 15 "Cancel" 300
  1735. ;;  Ctext @xy(80,10)   200 30 "The installation directory that you have defined is invalid and must be corrected before installing the selected products.  "
  1736. ;;  Ctext @xy(80,30)   200 30 "The installation directory may be invalid due to one or more of the following ... "
  1737. ;;  Ltext @xy(80,50)   225 12 " * Directory does not exist."
  1738. ;;  Ltext @xy(80,60)   225 12 " * Does not contain a fully qualified path assignment. "
  1739. ;;  Ltext @xy(80,70)   225 12 " * Does not have read/write access to the directory.   "
  1740. ;;  Ltext @xy(80,80)   225 12 " * Directory path contains invalid characters.         "
  1741. ;;  Ltext @xy(80,100)  220 12 "The following installation directory is invalid.              "
  1742. ;;  EditText    @xy(80,110)   155 12 Uses [GetIdir_IDir] Border NoHideSelection AutoHScroll ReadOnly Disabled
  1743. ;;EndDialogBox
  1744. ;;
  1745. ;;If [Dialog_Rc] = 300
  1746. ;;   Do ExitConfirm
  1747. ;;EndIf
  1748. ;;
  1749.  
  1750. EndProcedure
  1751. Procedure QueInstallFiles
  1752. Quefilegroup 100 To [IDIR_Info]
  1753. Quefilegroup 110 To [IDIR_SDW]
  1754.  
  1755. EndProcedure
  1756. Procedure OnLine
  1757. :Retry
  1758. SetMouseCursor Wait
  1759. [String1] := [Product_ID][Product_File]
  1760. SetProductClassTo "SUPER PROGRAM II"  ;; required
  1761. [Str1] := InstanceCode
  1762.  
  1763. ;;Do InstDLL
  1764.  
  1765. [L_Check] := LengthOf [Product_Name]
  1766. If [L_Check] > 175
  1767.    [T_Desc] := SubStringOf [Product_Name] From 1 To 175
  1768.    [T_Desc] := [T_Desc] ...
  1769.   Else
  1770.    [T_Desc] := [Product_Name] 
  1771. EndIf
  1772.  
  1773. if [Reg_CCNo] = BlankString 
  1774.    [StringS] := None
  1775. else
  1776.    [StringS] := [Reg_CCNo]
  1777. EndIf
  1778.  
  1779. ;;[CC_Text]  := Card Number:       [StringS]   Exp. Date: [Reg_ExpDate]
  1780. [PI_Text]  := Product Id:            [Product_ID]
  1781. [Ist_Text] := Instance Code:      [Str1]
  1782. SetMouseCursor Arrow
  1783. DialogBox  @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader "Manual Software Registration" 
  1784.     Font "MS Sans Serif" 8
  1785.     LText @xy(75,7) 195 50 "Since you were unable to register electronically, you can still purchase ([T_Desc]) ."
  1786.     LText @xy(75,45) 195 40 "You will need to dial [Support_Number] while at this screen. Have your credit card, Product Id and Instance Code ready as shown below. When the sales representive gives you the corresponding key, enter the Access Code you are given in the box below."
  1787.     Bitmap @xy(8,7) Bitmap 14
  1788.     LText @xy(75,90) 195 12 "[PI_Text]"
  1789.     LText @xy(75,105) 195 12 "[Ist_Text]"
  1790.     LText @xy(75,120) 60 12 "Access Code:"
  1791.     EditText @xy(135,120) 85 12 Uses [Str2] Border UpperCase
  1792.  LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  1793.  
  1794.  PushButton OnLine_Next ProcIs OnLine_Check @xy(180,145) 45 15 "Next >" 200
  1795.  PushButton @xy(135,145) 45 15 "< &Back" 100 
  1796.  PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  1797.  Static @xy(8,140) 269 1 "" BlackRect
  1798. EndDialogBox
  1799.  
  1800. If [Dialog_Rc] = 300
  1801.    Do ExitConfirm
  1802. EndIf
  1803.  
  1804.  
  1805.  
  1806.  
  1807. EndProcedure
  1808. Procedure NextConfirm
  1809. ;;;; Check for FreeSpaceOnDrive 
  1810. ;;ClearArray [FSPChk_Dir]             ;; Clear old Array contents
  1811. ;;[FSPChk_Dir][1]  := [GetIdir_IDir]  ;; Drive/Directory to check 
  1812. ;;[FSPChk_Options] := BlankString     ;; <All> - Checks all drives for required freespace.
  1813. ;;Do FSPChk       
  1814. ;; <BlankString> - Checks for required freespace on a specified drive.
  1815.  
  1816. if [GetIdir_IDir] <> BlankString
  1817.   If .Not. DirectoryAllowable [GetIdir_IDir] 
  1818.     Dialog UserHeader "Directory Not Acceptable"
  1819.      Invalid directory specified. 
  1820.      Please enter a valid drive and directory.
  1821.     EndDialog     
  1822.     Exit
  1823.   EndIf
  1824. else
  1825.     Dialog UserHeader "Directory Not Acceptable"
  1826.      Invalid directory specified. 
  1827.      Please enter a valid drive and directory.
  1828.     EndDialog     
  1829.     Exit
  1830. EndIf
  1831.  
  1832. :NextConfirm_ReadWrt
  1833. ;; Calling Convention: ReadWrt
  1834. [ReadWrt_Dir][1]  := [GetIdir_IDir]  ;; Drive/Directory to check 
  1835. [ReadWrt_Options] := BlankString     ;; <BlankString> - Use if no option specified
  1836.                                      ;; <All> - Checks all known drives for Read/Write access
  1837. Do ReadWrt                           ;; Checks for required freespace on a specified drive.
  1838.  
  1839. ;; Return Codes:
  1840. ;; [ReadWrt_Rc]         :=     ;; 0  = All drives have Read/Write access/or selected dir
  1841. ;;                             ;; >0 = Indicates one or more Drives/dirs do not have read/write  
  1842. ;; [ReadWrt_DirList][X] :=     ;; TextArray of Drive/Dirs not Read/Write
  1843.  
  1844. Do ReadWrtErr
  1845.  
  1846. If [ReadWrtErr_Rc] = 300 
  1847.    SoLong Quietly
  1848. EndIf
  1849.  
  1850. If [ReadWrtErr_Rc] = 100
  1851.    Exit
  1852. EndIf
  1853.  
  1854. If [Install_Type] = Demo      
  1855.    UnQueAllFiles
  1856.    Do QueDemoFiles                             ;; Demo Dir files 
  1857.    Do QueBViews
  1858.    [Number1] := QueSize + 100000
  1859.   ;; [Disk_Space_Required] := [Number1]
  1860.  
  1861.    ;; Check for FreeSpaceOnDrive 
  1862.    ClearArray [FSPChk_Dir]             ;; Clear old Array contents
  1863.    ;;[FSPChk_Dir][1]  := BlankString   ;; Drive/Directory to check 
  1864.    [FSPChk_Options] := All             ;; <All> - Checks all drives for required freespace.
  1865.    Do FSPChk                           ;; <BlankString> - Checks for required freespace on a specified drive.
  1866.  
  1867.    ;; Return Codes: FSPChk
  1868.    ;; [FSPChk_Rc]         :=     ;; 0  = All drives have adequate free space available.
  1869.    ;;                            ;; >0 = Indicates one or more Drives/dirs required freespace.
  1870.    ;; [FSPChk_MsgList][X] :=     ;; TextArray of Drive/Dirs with insufficent freespace.
  1871.  
  1872.    UnQueAllFiles
  1873.  
  1874.    Do FSPCErr
  1875.  
  1876.    If [FSPCErr_Rc] = 300 
  1877.       SoLong Quietly
  1878.    EndIf
  1879.  
  1880.    If [FSPCErr_Rc] = 100
  1881.       Exit
  1882.    EndIf
  1883. EndIf
  1884.  
  1885. If [Install_Type] = Full
  1886.    UnQueAllFiles
  1887.    Do QueBViews
  1888.    [Number1] := QueSize 
  1889.    [Number2] := [Disk_Space_Required]
  1890.    [Number3] := [Number1] + [Number2]
  1891.    ;;[Disk_Space_Required] := [Number3]
  1892.  
  1893.    ;;   PopUp Full
  1894.    ClearArray [FSPChk_Dir]    
  1895.    ClearArray [FSPChk_MsgList]
  1896.    ;;[Number1] := [Disk_Space_Required]
  1897.    UnQueAllFiles
  1898.  
  1899. ;;   PopUp If [Number3] > FreeSpaceOnDrive [GetIdir_IDir]
  1900.  
  1901.    If [Number3] > FreeSpaceOnDrive [GetIdir_IDir]
  1902.       [FSPChk_Rc] := 1                           ;; 0  = All drives have adequate free space available.                            ;; >0 = Indicates one or more Drives/dirs required freespace.
  1903.       [FSPChk_MsgList][[FSPChk_Rc]] := [GetIdir_IDir]    ;; TextArray of Drive/Dirs with insufficent freespace.
  1904.       ;; Return Codes: FSPChk
  1905.       ;; [FSPChk_Rc]         :=     ;; 0  = All drives have adequate free space available.
  1906.       ;;                            ;; >0 = Indicates one or more Drives/dirs required freespace.
  1907.       ;; [FSPChk_MsgList][X] :=     ;; TextArray of Drive/Dirs with insufficent freespace.
  1908.  
  1909.       Do FSPCErr
  1910.       If [FSPCErr_Rc] = 300 
  1911.          SoLong Quietly
  1912.       EndIf
  1913.  
  1914.       If [FSPCErr_Rc] = 100
  1915.          Exit
  1916.       EndIf
  1917.    EndIf
  1918. EndIf
  1919.  
  1920.    UnQueAllFiles
  1921. Exit DismissDialog
  1922.  
  1923. EndProcedure
  1924. Procedure InstallCheck
  1925.  
  1926. If [GetIdir_IDir] = BlankString
  1927.    [GetIdir_IDir] := C:[Default_Directory_Name]
  1928. EndIf
  1929.  
  1930. [InstallationDirectory] := [GetIdir_IDir] 
  1931. [Text_1] := [Infobase_Title] will be installed to the following drive and directory. To change the installation directory, use the edit box below or select 'Change' and follow the prompts.
  1932. ;;LoadBitMap elo.bmp
  1933. UpdateWindow
  1934.  
  1935. ;; ***Substitute source directory for ShadowDirectory argument if necessary***
  1936.    DialogBox  @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader "Determine Installation Drive and Directory"  ;;ShadowDirectory\DTRINST.DBB
  1937.       Font "MS Sans Serif" 8
  1938.       Static @xy(84,7) 190 50 "[Text_1]"
  1939.       BitMap @xy(8,7) BitMap 14
  1940.       PushButton N_Button ProcIs NextConfirm @xy(180,145) 45 15 "Next >" 200
  1941.       PushButton @xy(135,145) 45 15 "< &Back" 100
  1942.       PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  1943.       Static @xy(8,140) 269 1 "" BlackRect
  1944.       GroupBox @xy(84,100) 193 32 "Install to:"
  1945.       PushButton InstallDir ProcIs GetIDir @xy(224,111) 45 15 "Change" 400
  1946.       EditText @xy(90,112) 129 12 Uses [GetIdir_IDir] Border UpperCase 
  1947.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  1948.    EndDialogBox
  1949.  
  1950. ;;If [Dialog_Rc] = 200
  1951. ;;   Do NextConfirm
  1952. ;;EndIf
  1953.  
  1954. If [Dialog_Rc] = 300
  1955.    Do ExitConfirm
  1956. EndIf
  1957.  
  1958. [InstallationDirectory] := [GetIdir_IDir] 
  1959.  
  1960.  
  1961. EndProcedure
  1962. Procedure IICons
  1963. ;;***************************************************************************
  1964. ;; IICons - Checks all Drives/Dirs freespace against QueSize  
  1965. ;;
  1966. ;; HPI - Leading the world in installation technology
  1967. ;; ** Windows / Windows NT / OS2 / DOS / Client Server **
  1968. ;; From the HPI script library 09/25/95 - CNH
  1969. ;; ---------------------------------------------------------------------------------------------------------------
  1970. ;; Description: IICons 
  1971. ;;
  1972. ;; Compatiability: IICons
  1973. ;; Windows, Win95, NT installers only ! 
  1974. ;;
  1975. ;; Calling Convention: IICons
  1976. ;; [IICons_Dir][X]  :=               
  1977. ;; [IICons_Options] := BlankString  
  1978. ;; Do IICons                         
  1979. ;;
  1980. ;; Return Codes: IICons
  1981. ;;
  1982. ;; Variables: IICons
  1983. ;;
  1984. ;;*************************************************************
  1985.  
  1986. ClearScreen
  1987. LoadBitmap 13 ShadowDirectory\OneM.Bmp
  1988. ShowBitMap 13 @xy(Center,Center)
  1989. Delay 1
  1990. TextOut @xy(Center,Center) Installing icons...
  1991.  
  1992. [IICons_Group] := [GetGroup_InputGrp]
  1993.  
  1994. If [Install_Type] = Demo
  1995.    [String1] := [Icon_Name] - Demo
  1996.    [Icon_Name] := [String1]
  1997.    ProgramManagerDDE
  1998.      CreateGroup([IICons_Group])
  1999.      DeleteItem([Icon_Name])
  2000.      AddItem([Views31IDir]\[ExeName] -i [IDIR_Demo]\[Demo_Infobase_File_Name],[Icon_Name])
  2001.    EndProgramManagerDDe
  2002. EndIf
  2003.  
  2004. If [Install_Type] = Full
  2005.    ProgramManagerDDE
  2006.      CreateGroup([IICons_Group])
  2007.      DeleteItem([Icon_Name])
  2008.      AddItem([Views31IDir]\[ExeName] -i [IDIR_SDW]\[Shadow_File_Name],[Icon_Name])
  2009.      DeleteItem([Icon_Name] - UnInstall)
  2010.      AddItem([IDIR_Info]\UnInstal.Exe UnInstal.Inf -P:[Infobase_File_Name],[Icon_Name] - UnInstall,[IDIR_Info]\UnInstal.Exe,1)
  2011.    EndProgramManagerDDe
  2012. EndIf
  2013.  
  2014. ProgramManagerDDE
  2015.   CreateGroup([IICons_Group])
  2016.   ShowGroup([IICons_Group],2)
  2017. EndProgramManagerDDe
  2018.  
  2019. [Number8] := LengthOf [Views31IDir]
  2020.  
  2021. if [Number8] > 2
  2022. [viewsini] := SubStringOf [Views31IDir] From [Number8] To [Number8]
  2023.  
  2024. if "[viewsini]" = "\" 
  2025.   [Number8] := [Number8] - 1
  2026.   [viewsini] := SubStringOf [Views31IDir] From 1 To [Number8]
  2027. else
  2028.   [viewsini] := SubStringOf [Views31IDir] From 1 To [Number8]
  2029. endIf
  2030. ;; replace existing views.ini file with Emanuel version
  2031.  If FileExists [viewsini]\views.ini
  2032.    DeleteFiles From [viewsini] Quietly
  2033.      views.ini
  2034.    EndDeleteFiles
  2035.  EndIf
  2036.  
  2037.  SetCopyAttrTo 00
  2038.  CopyFiles From [InstallFromDirectory] To [viewsini] Quietly
  2039.     views.ini
  2040.  EndCopyFiles
  2041.  
  2042.    ModifyTextFile [viewsini]\Views.ini Quietly NoBackup
  2043.       Replace %InstallationDirectory% With [viewsini]
  2044.    EndModifyTextFile
  2045.  
  2046.    ModifyTextFile [viewsini]\Views.ini Quietly NoBackup
  2047.       Replace %WindowsDirectory% With [WindowsDirectory]
  2048.    EndModifyTextFile
  2049.  
  2050. endIf
  2051.  
  2052. HideBitMap 13
  2053. ClearScreen
  2054.  
  2055.  
  2056. EndProcedure
  2057. Procedure ModIni
  2058. ClearScreen
  2059. LoadBitMap 13 ShadowDirectory\OneM.Bmp
  2060. ShowBitMap 13 @xy(Center,Center)
  2061. Delay 1
  2062. TextOut @xy(Center,Center) Modifying Ini files...
  2063. Delay 1
  2064.  
  2065. If .Not. FileExists [WindowsDirectory]\lname.ini
  2066.    CreateFile [WindowsDirectory]\lname.ini
  2067. EndIf
  2068.  
  2069. If [Install_Type] = Full
  2070.    [Array1][1] := Master Infobase Directory
  2071.    [Array1][2] := [Infobase_Title] - Master
  2072.    [Array1][3] := [IDIR_Info]\[Infobase_File_Name]
  2073.    [Array1][4] := [WindowsDirectory]\lname.ini
  2074.    WritePrivateProfileString Using [Array1] NoBackup
  2075.  
  2076.    [Array1][1] := Infobase Directory
  2077.    [Array1][2] := [Infobase_Title]
  2078.    [Array1][3] := [IDIR_SDW]\[Shadow_File_Name]
  2079.    [Array1][4] := [WindowsDirectory]\lname.ini
  2080.    WritePrivateProfileString Using [Array1] NoBackup
  2081.  
  2082.    [Array1][1] := [Infobase_File_Name]
  2083.    [Array1][2] := Properties
  2084.    [Array1][3] := [Infobase_Title],[IICons_Group],[Icon_Name]
  2085.    [Array1][4] := [WindowsDirectory]\lname.ini
  2086.    WritePrivateProfileString Using [Array1] NoBackup
  2087.  
  2088. EndIf
  2089.  
  2090. if [Install_Type] = Demo
  2091.    [Array1][1] := Master Infobase Directory
  2092.    [Array1][2] := [Demo_Infobase_Title]
  2093.    [Array1][3] := [IDIR_Demo]\[Demo_Infobase_File_Name]
  2094.    [Array1][4] := [WindowsDirectory]\lname.ini
  2095.    WritePrivateProfileString Using [Array1] NoBackup
  2096.  
  2097.    [Array1][1] := Infobase Directory
  2098.    [Array1][2] := [Demo_Infobase_Title]
  2099.    [Array1][3] := [IDIR_Demo]\[Demo_Infobase_File_Name]
  2100.    [Array1][4] := [WindowsDirectory]\lname.ini
  2101.    WritePrivateProfileString Using [Array1] NoBackup
  2102. EndIf
  2103.  
  2104. If [Install_BViews] = Yes
  2105.  
  2106.    ModifyTextFile [Views31IDir]\Views.ini Quietly NoBackup
  2107.       Replace %InstallationDirectory% With [Views31IDir]
  2108.    EndModifyTextFile
  2109.  
  2110.    ModifyTextFile [Views31IDir]\Views.ini Quietly NoBackup
  2111.       Replace %WindowsDirectory% With [WindowsDirectory]
  2112.    EndModifyTextFile
  2113.  
  2114.    ModifyTextFile [Views31IDir]\Foliohlp.ini Quietly NoBackup
  2115.       Replace %InstallationDirectory% With [Views31IDir]
  2116.    EndModifyTextFile
  2117.  
  2118.    ModifyTextFile [Views31IDir]\Foliohlp.ini Quietly NoBackup
  2119.       Replace %WindowsDirectory% With [WindowsDirectory]
  2120.    EndModifyTextFile
  2121.  
  2122. EndIf
  2123.  
  2124. ClearScreen
  2125. EndProcedure
  2126. Procedure DDENonFatalErrorTrap
  2127. ;; Dummy procedure, do not delete
  2128. EndProcedure
  2129. Procedure FindViews31
  2130. ClearScreen
  2131. SetMouseCursor Wait
  2132. Delay 1
  2133.  
  2134. [ExeName] := views.exe
  2135.  
  2136. ClearArray [Views31Dirs]
  2137.  
  2138. UnLoadBitMap 13
  2139. LoadBitMap 13 ShadowDirectory\OneM.BMP
  2140. ShowBitMap 13 @xy(Center,Center)
  2141. Delay 1
  2142. TextOut @xy(Center,Center) Searching for Folio VIEWS ...
  2143.  
  2144. ;; Default search for root location
  2145. ;; must add a trailing \
  2146. ;;
  2147. [Views31IDir] := BlankString
  2148.  
  2149. [FPFile_CurDrive] := C
  2150. While [FPFile_CurDrive] < Z
  2151.   If DriveIsPresent [FPFile_CurDrive]
  2152.      If .Not. DriveIsRemoveable [FPFile_CurDrive]
  2153.        If DirectoryExists [FPFile_CurDrive]:\Views31
  2154.          If FileExists [FPFile_CurDrive]:\Views31\views.exe .AND. FileExists [FPFile_CurDrive]:\Views31\rightsmn.dll .AND. FileExists [FPFile_CurDrive]:\Views31\libstub.dll
  2155.             [Views31IDir] := [FPFile_CurDrive]:\Views31
  2156.             SetMouseCursor Arrow
  2157.             Exit
  2158.           EndIf
  2159.        EndIf
  2160.       Else
  2161.        ;; DefineDrive [FPFile_CurDrive] Absent
  2162.      EndIf
  2163.   EndIf
  2164.   IncrementString [FPFile_CurDrive]
  2165. EndWhile
  2166.  
  2167. ClearArray [Views31Dirs]
  2168. [FPFile_CurDrive] := C
  2169. While [FPFile_CurDrive] < Z
  2170. [SSkip] := 0
  2171.  
  2172.   If DriveIsPresent [FPFile_CurDrive]
  2173.  
  2174.      if [FPFile_CurDrive] = [InstallFromDrive] .AND. DriveIsCDRom [FPFile_CurDrive]
  2175.         ;; PopUp Not Searching Remote [FPFile_CurDrive]      
  2176.         [SSkip] := 1
  2177.         Goto FPFile_NextDrive
  2178.      EndIf
  2179.  
  2180.      If DriveIsRemote [FPFile_CurDrive]            ;; Drive is on the network
  2181.         ;; PopUp Not Searching Remote [FPFile_CurDrive]      
  2182.         [SSkip] := 1
  2183.         Goto FPFile_NextDrive
  2184.      EndIf
  2185.  
  2186.      If DriveIsRemoveable [FPFile_CurDrive] .OR. DriveIsCDRom [FPFile_CurDrive]    ;; Drive is removable
  2187.         ;; PopUp Not Searching Remote [FPFile_CurDrive]      
  2188.         [SSkip] := 1
  2189.         Goto FPFile_NextDrive
  2190.      EndIf
  2191.  
  2192.      If FreeSpaceOnDrive [FPFile_CurDrive] < 1    ;; CDROM Present no CDROM disk in drive
  2193.         ;; PopUp Not Searching [FPFile_CurDrive]      
  2194.         [SSkip] := 1
  2195.         Goto FPFile_NextDrive
  2196.      EndIf
  2197.  
  2198.      If FreeSpaceOnDrive [FPFile_CurDrive] = 0     ;; No freespace, cannot write to drive
  2199.         If DirectoryAllowable [FPFile_CurDrive]:\  ;; Probably a CDRom drive...
  2200.           Else 
  2201.          ;;  PopUp Not Searching [FPFile_CurDrive]
  2202.            [SSkip] := 1
  2203.               Goto FPFile_NextDrive
  2204.         EndIf
  2205.      EndIf
  2206.  
  2207.      If [SSkip] = 0
  2208.         ;; PopUp Searching [FPFile_CurDrive]
  2209.         ClearArray [FPFile_Dirs] 
  2210.         [FPFile_Dirs] := FullPathTo views.exe Origin=[FPFile_CurDrive]:\ Quietly
  2211.  
  2212. ;;GetMenuChoice
  2213. ;;[FPFile_Dirs]
  2214. ;;EndGetMenuChoice
  2215.  
  2216.         [Number1] := LastIndexUsedFor [FPFile_Dirs]
  2217.         If [Number1] > 0
  2218.            [Number2] := 0
  2219.            While [Number2] < [Number1] 
  2220.              IncrementNumber [Number2]
  2221.              [String1] := [FPFile_Dirs][[Number2]] 
  2222.  
  2223.              ;; Filter Duplicate entries
  2224.              [Number21] := 0
  2225.              [Number31] := LastIndexUsedFor [Views31Dirs]
  2226.              [Number32] := 0
  2227.  
  2228.              If [Number31] > 0 
  2229.              While [Number21] < [Number31] 
  2230.                IncrementNumber [Number21]
  2231.                [String21] := [Views31Dirs][[Number21]]
  2232.                If [String21] = [String1]
  2233.                   Goto FPFile_FDupCheck 
  2234.                EndIf
  2235.              EndWhile 
  2236.              EndIf 
  2237.              IncrementNumber [Number31]
  2238.              [Views31Dirs][[Number31]] := [String1]
  2239.              :FPFile_FDupCheck 
  2240.            EndWhile
  2241.            ;; Goto File_Found
  2242.         EndIf
  2243.      EndIf
  2244.   EndIf
  2245.  
  2246.   :FPFile_NextDrive
  2247.   IncrementString [FPFile_CurDrive]
  2248. EndWhile
  2249.  
  2250. ;;:File_Found
  2251. ;;GetMenuChoice
  2252. ;;[Views31Dirs]
  2253. ;;EndGetMenuChoice
  2254. ;;
  2255.  
  2256. ;; If not found off of the root then search all 
  2257. ;; local harddrives
  2258. ;; 
  2259.  
  2260. ;; Multiple paths to the same .exe name, prompt user to specify which path
  2261. ;; is the current path.
  2262. [Number1] := LastIndexUsedFor [Views31Dirs]
  2263.  
  2264. If [Number1] > 1
  2265. ClearScreen
  2266. HideBitMap 13
  2267.  
  2268. :Prompt_User
  2269. [ScanIcons_ExePath] := BlankString
  2270. [ScanIcons_Text]    := Because you have multiple versions of VIEWS.EXE, we were unable to determine which directory contains your current working version of VIEWS.EXE.
  2271. [Invalid_Views]     := False
  2272.  
  2273. ;; Prompt user for new program group name
  2274. DialogBox  @xy(center,80) 284 175 Returns [Dialog_Rc] BlackOnLightGray UseHeader "Unable To Determine Working Directory"  ;;F:\VR\SCRIPTS\PROGROUP.DBB
  2275.       Font "MS Sans Serif" 8
  2276.       BitMap @xy(8,8) BitMap 14
  2277.       Static @xy(8,150) 269 1 "" BlackRect
  2278.       PushButton FViews31 ProcIs Check_Views31 @xy(180,155) 45 15 "Next >" 200
  2279.       PushButton @xy(136,155) 45 15 "< &Back" 100 Disabled
  2280.       PushButton C_Button ProcIs ExitConfirm @xy(232,155)  45 15 "Cancel" 300
  2281.       LText @xy(84,7) 189 40 "[ScanIcons_Text]"
  2282.       LText @xy(84,52) 110 12 "Select one of the following directories."
  2283.       ComboBox @xy(84,60) 191 85 Uses [ScanIcons_ExePath] LoadWith [Views31Dirs] Border ;; Sort
  2284. EndDialogBox
  2285.  
  2286.    If [Dialog_Rc] = 300
  2287.       SoLong Quietly
  2288.    EndIf
  2289.  
  2290.    if [Invalid_Views] = True
  2291.       Dialog UserHeader "Missing Required Files"
  2292.       You are missing files that are required for
  2293.       Folio Bound Infobases.  This installer will
  2294.       now search for Folio Bound VIEWS to see if
  2295.       all required files have been installed.
  2296.       EndDialog
  2297.       goto FindBViews
  2298.    EndIf
  2299.  
  2300.    ;; Filter Code to filter out unwanted text leaving only the directory path.
  2301.       [Views31IDir] := PathNameOf [ScanIcons_ExePath]
  2302.       Exit
  2303.  
  2304.   Else
  2305.  
  2306.    [Views31IDir] := PathNameOf [Views31Dirs][1]
  2307.    [Number1] := LengthOf [Views31IDir]
  2308.  
  2309.    if [Number1] < 4
  2310.       goto FindBViews
  2311.    EndIf
  2312.  
  2313.    if FileExists [Views31IDir]\rightsmn.dll .And. FileExists [Views31IDir]\libstub.dll
  2314.       Exit 
  2315.    else
  2316.       goto FindBViews
  2317.    EndIf
  2318.  
  2319.   ;; Filter Code to filter out unwanted text leaving only the directory path.
  2320.  
  2321. EndIf
  2322.  
  2323. :FindBViews
  2324. ClearArray [Views31Dirs]
  2325. ClearScreen
  2326.  
  2327. [ExeName] := bviews.exe
  2328.  
  2329. ShowBitMap 13 @xy(Center,Center)
  2330. Delay 1
  2331. TextOut @xy(Center,Center) Searching for Folio Bound VIEWS ...
  2332.  
  2333. ;; Default search for root location
  2334. ;; must add a trailing \
  2335. ;;
  2336. [Views31IDir] := BlankString
  2337.  
  2338. ClearArray [Views31Dirs]
  2339. [FPFile_CurDrive] := C
  2340. While [FPFile_CurDrive] < Z
  2341. [SSkip] := 0
  2342.  
  2343.   If DriveIsPresent [FPFile_CurDrive]
  2344.  
  2345.      if [FPFile_CurDrive] = [InstallFromDrive] .AND. DriveIsCDRom [FPFile_CurDrive]
  2346.         ;; PopUp Not Searching Remote [FPFile_CurDrive]      
  2347.         [SSkip] := 1
  2348.         Goto FPFile_NextDriveA
  2349.      EndIf
  2350.  
  2351.      If DriveIsRemote [FPFile_CurDrive]            ;; Drive is on the network
  2352.         ;; PopUp Not Searching Remote [FPFile_CurDrive]      
  2353.         [SSkip] := 1
  2354.         Goto FPFile_NextDriveA
  2355.      EndIf
  2356.  
  2357.      If DriveIsRemoveable [FPFile_CurDrive]            ;; Drive is removable
  2358.         ;; PopUp Not Searching Remote [FPFile_CurDrive]      
  2359.         [SSkip] := 1
  2360.         Goto FPFile_NextDriveA
  2361.      EndIf
  2362.  
  2363.      If FreeSpaceOnDrive [FPFile_CurDrive] < 1    ;; CDROM Present no CDROM disk in drive
  2364.         ;; PopUp Not Searching [FPFile_CurDrive]      
  2365.         [SSkip] := 1
  2366.         Goto FPFile_NextDriveA
  2367.      EndIf
  2368.  
  2369.      If FreeSpaceOnDrive [FPFile_CurDrive] = 0     ;; No freespace, cannot write to drive
  2370.         If DirectoryAllowable [FPFile_CurDrive]:\  ;; Probably a CDRom drive...
  2371.           Else 
  2372.          ;;  PopUp Not Searching [FPFile_CurDrive]
  2373.            [SSkip] := 1
  2374.               Goto FPFile_NextDriveA
  2375.         EndIf
  2376.      EndIf
  2377.  
  2378.      If [SSkip] = 0
  2379.         ;; PopUp Searching [FPFile_CurDrive]
  2380.         ClearArray [FPFile_Dirs] 
  2381.         [FPFile_Dirs] := FullPathTo bviews.exe Origin=[FPFile_CurDrive]:\ Quietly
  2382.  
  2383. ;;GetMenuChoice
  2384. ;;[FPFile_Dirs]
  2385. ;;EndGetMenuChoice
  2386.  
  2387.         [Number1] := LastIndexUsedFor [FPFile_Dirs]
  2388.         If [Number1] > 0
  2389.            [Number2] := 0
  2390.            While [Number2] < [Number1] 
  2391.              IncrementNumber [Number2]
  2392.              [String1] := [FPFile_Dirs][[Number2]] 
  2393.  
  2394.              ;; Filter Duplicate entries
  2395.              [Number21] := 0
  2396.              [Number31] := LastIndexUsedFor [Views31Dirs]
  2397.              [Number32] := 0
  2398.  
  2399.              If [Number31] > 0 
  2400.              While [Number21] < [Number31] 
  2401.                IncrementNumber [Number21]
  2402.                [String21] := [Views31Dirs][[Number21]]
  2403.                If [String21] = [String1]
  2404.                   Goto FPFile_FDupCheckA 
  2405.                EndIf
  2406.              EndWhile 
  2407.              EndIf 
  2408.              IncrementNumber [Number31]
  2409.              [Views31Dirs][[Number31]] := [String1]
  2410.              :FPFile_FDupCheckA 
  2411.            EndWhile
  2412.            ;; Goto File_Found
  2413.         EndIf
  2414.      EndIf
  2415.   EndIf
  2416.  
  2417.   :FPFile_NextDriveA
  2418.   IncrementString [FPFile_CurDrive]
  2419. EndWhile
  2420.  
  2421. ;;:File_Found
  2422. ;;GetMenuChoice
  2423. ;;[Views31Dirs]
  2424. ;;EndGetMenuChoice
  2425. ;;
  2426.  
  2427. ;; If not found off of the root then search all 
  2428. ;; local harddrives
  2429. ;; 
  2430.  
  2431. ;; Multiple paths to the same .exe name, prompt user to specify which path
  2432. ;; is the current path.
  2433. [Number1] := LastIndexUsedFor [Views31Dirs]
  2434. [ExeName] := bviews.exe
  2435.  
  2436. If [Number1] > 1
  2437. ClearScreen
  2438. HideBitMap 13
  2439.  
  2440. :Prompt_User2
  2441. [ScanIcons_ExePath] := BlankString
  2442. [ScanIcons_Text]    := Because you have multiple versions of BVIEWS.EXE, we were unable to determine which directory contains your current working version of Bound VIEWS.
  2443. [Invalid_Views]     := False
  2444.  
  2445. ;; Prompt user for new program group name
  2446. DialogBox  @xy(center,80) 284 175 Returns [Dialog_Rc] BlackOnLightGray UseHeader "Unable To Determine Working Directory"  ;;F:\VR\SCRIPTS\PROGROUP.DBB
  2447.       Font "MS Sans Serif" 8
  2448.       BitMap @xy(8,8) BitMap 14
  2449.       Static @xy(8,150) 269 1 "" BlackRect
  2450.       PushButton FViews31 ProcIs Check_Views31 @xy(180,155) 45 15 "Next >" 200
  2451.       PushButton @xy(136,155) 45 15 "< &Back" 100 Disabled
  2452.       PushButton C_Button ProcIs ExitConfirm @xy(232,155)  45 15 "Cancel" 300
  2453.       LText @xy(84,7) 189 40 "[ScanIcons_Text]"
  2454.       LText @xy(84,52) 110 12 "Select one of the following directories."
  2455.       ComboBox @xy(84,60) 191 85 Uses [ScanIcons_ExePath] LoadWith [Views31Dirs] Border ;; Sort
  2456. EndDialogBox
  2457.  
  2458.    If [Dialog_Rc] = 300
  2459.       SoLong Quietly
  2460.    EndIf
  2461.  
  2462.    if [Invalid_Views] = True
  2463.       Dialog UserHeader "Missing Required Files"
  2464.       You are missing files that are required for
  2465.       Folio Bound Infobases.  This installer will
  2466.       now install Folio Bound VIEWS and all 
  2467.       necessary files.
  2468.       EndDialog
  2469.       goto InstallBViews
  2470.    EndIf
  2471.  
  2472.    ;; Filter Code to filter out unwanted text leaving only the directory path.
  2473.       [Views31IDir] := PathNameOf [ScanIcons_ExePath]
  2474.       Exit
  2475.  
  2476.   Else
  2477.  
  2478.    [Views31IDir] := PathNameOf [Views31Dirs][1]
  2479.    [Number1] := LengthOf [Views31IDir]
  2480.  
  2481.    if [Number1] < 4
  2482.       goto InstallBViews
  2483.    EndIf
  2484.  
  2485.    if [Views31IDir] = [InstallFromDrive]:\ 
  2486.        goto InstallBViews
  2487.    EndIf
  2488.  
  2489.    if FileExists [Views31IDir]\bviews.exe .And. FileExists [Views31IDir]\rightsmn.dll .And. FileExists [Views31IDir]\libstub.dll
  2490.       Exit 
  2491.    else
  2492.       goto InstallBViews
  2493.    EndIf
  2494.  
  2495.   ;; Filter Code to filter out unwanted text leaving only the directory path.
  2496.  
  2497. EndIf
  2498.  
  2499.  
  2500. :InstallBViews
  2501.  
  2502. ;; Install BViews product files
  2503. ;; *********************************************
  2504. ;; If neither BViews or Views.Exe is found then
  2505. ;; install BViews files.
  2506. ;;
  2507. UnLoadBitMap 13
  2508.  
  2509. DialogBox  @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader "Unable To Locate Folio VIEWS"  ;;F:\VR\SCRIPTS\PROGROUP.DBB
  2510.   Font "MS Sans Serif" 8
  2511.   BitMap @xy(8,7) BitMap 14
  2512.   LText @xy(83,7) 180 50 "The installer was unable to locate Folio VIEWS or Bound VIEWS. It is possible that VIEWS exists, but that required files are missing from the installation. Either VIEWS or Bound VIEWS is required to run the Infobase."
  2513.   LText @xy(83,60) 180 20 "Folio Bound VIEWS will now be installed to:"
  2514.   LText @xy(83,80) 180 20 "    [IDIR_BViews]"
  2515.   Static @xy(8,140) 269 1 "" BlackRect
  2516.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  2517.   PushButton @xy(180,145) 45 15 "Next >" 200
  2518.   PushButton @xy(135,145) 45 15 "< &Back" 100 Disabled
  2519.   PushButton @xy(232,145) 45 15 "Cancel" 300
  2520. EndDialogBox
  2521.  
  2522. If [Dialog_Rc] = 300
  2523.    Do ExitConfirm
  2524. EndIf
  2525.  
  2526. ;; CreateDirectoryIfNecessary [IDIR_BViews]
  2527.  
  2528. [Install_BViews] := Yes
  2529. [Views31IDir] := [IDIR_BViews]
  2530. [ExeName]     := BVIEWS.EXE
  2531.  
  2532.  
  2533. ClearScreen
  2534.  
  2535. EndProcedure
  2536. Procedure RegUser_Check
  2537.  
  2538.         EnableWindow RegScreen.Back Off
  2539.         EnableWindow RegScreen.RegCheck Off
  2540.         EnableWindow RegScreen.RegCancel Off
  2541.         EnableWindow RegScreen.Pb_HomeAddr Off
  2542.  
  2543. SetMouseCursor Wait
  2544.  
  2545. ;;LoadBitMap 13 ShadowDirectory\OneM.BMP
  2546. ;;TextOut OnBitMap 13 @xy(60,25) Validating Registration Form ...
  2547. ;;DialogBox OneM @xy(CenterScreen,CenterScreen) 177 35 Returns [Dialog_Rc] BlackOnWhite UseHeader " One Moment Please " Delay 2000
  2548. ;;      Font "MS Sans Serif" 8
  2549. ;;      Bitmap @xy(0,0) Bitmap 13
  2550. ;;EndDialogBox
  2551. UpdateWindow
  2552. ClearScreen
  2553. Delay 1
  2554. LoadBitMap 13 ShadowDirectory\OneM.BMP
  2555. ShowBitMap 13 @xy(Center,Center)
  2556. Delay 1
  2557. TextOut @xy(Center,Center) Validating Registration Form ...
  2558. SetMouseCursor Wait
  2559.  
  2560. ClearArray [RegUser_Data]
  2561. [RegUser_Count] := 0
  2562.  
  2563. ;;;; ----------------------------------
  2564. ;;;; Verify lexis nexis id
  2565. ;;;;
  2566. ;;If [Reg_GradYear] < 1999 .And. [Reg_OSFRb] = 1
  2567. ;;If [Reg_LnId] = BlankString
  2568. ;;   IncrementNumber [RegUser_Count]
  2569. ;;   [RegUser_Data][[RegUser_Count]] := Emanuel Electronic Format ID (No data entered)
  2570. ;;   Goto Verify_FName
  2571. ;;EndIf
  2572. ;;[StrCheck_String] := [Reg_LnId]
  2573. ;;[StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
  2574. ;;[StrCheck_Mask]   := BlankString
  2575. ;;[StrCheck_Rc]     := 0
  2576. ;;Do StrCheck
  2577. ;;If [StrCheck_Rc] > 0
  2578. ;;   IncrementNumber [RegUser_Count]
  2579. ;;   [RegUser_Data][[RegUser_Count]] := Emanuel Electronic Format ID (A-Z,0-9) only!
  2580. ;;EndIf
  2581. ;;EndIf
  2582.  
  2583. ;; ----------------------------------
  2584. ;; Verify First name
  2585. ;;
  2586. :Verify_FName
  2587. If [Reg_FName] = BlankString
  2588.    IncrementNumber [RegUser_Count]
  2589.    [RegUser_Data][[RegUser_Count]] := First Name (No data entered)
  2590.    Goto Verify_LName
  2591. ENdIf
  2592. [StrCheck_String] := [Reg_FName]
  2593. [StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTUVWXYZ "
  2594. [StrCheck_Mask]   := BlankString
  2595. [StrCheck_Rc]     := 0
  2596. Do StrCheck
  2597. If [StrCheck_Rc] > 0
  2598.    IncrementNumber [RegUser_Count]
  2599.    [RegUser_Data][[RegUser_Count]] := First Name (A-Z,Space) only!
  2600. EndIf
  2601.  
  2602. ;; ----------------------------------
  2603. ;; Verify Middle Initial
  2604. ;;
  2605. :Verify_MI
  2606. [StrCheck_String] := [Reg_MName]
  2607. [StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTUVWXYZ "
  2608. [StrCheck_Mask]   := BlankString
  2609. [StrCheck_Rc]     := 0
  2610. Do StrCheck
  2611. If [StrCheck_Rc] > 0
  2612.    IncrementNumber [RegUser_Count]
  2613.    [RegUser_Data][[RegUser_Count]] := Middle Initial (A-Z,Space) only!
  2614. EndIf
  2615.  
  2616. ;; ----------------------------------
  2617. ;; Verify last name
  2618. ;;
  2619. :Verify_LName
  2620. If [Reg_LName] = BlankString
  2621.    IncrementNumber [RegUser_Count]
  2622.    [RegUser_Data][[RegUser_Count]] := Last Name (No data entered)
  2623.    Goto Verify_Addr1
  2624. EndIf
  2625. [StrCheck_String] := [Reg_LName]
  2626. [StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTUVWXYZ- "
  2627. [StrCheck_Mask]   := BlankString
  2628. [StrCheck_Rc]     := 0
  2629. Do StrCheck
  2630. If [StrCheck_Rc] > 0
  2631.    IncrementNumber [RegUser_Count]
  2632.    [RegUser_Data][[RegUser_Count]] := Last Name (A-Z,Space) only! 
  2633. EndIf
  2634.  
  2635. ;; ----------------------------------
  2636. ;; Verify address information
  2637. ;;
  2638. :Verify_Addr1
  2639. If [Reg_Addr1] = BlankString .And. [Reg_Addr1] = BlankString
  2640.    IncrementNumber [RegUser_Count]
  2641.    [RegUser_Data][[RegUser_Count]] := Address (No data entered)
  2642.    Goto Verify_City
  2643. EndIf
  2644. [StrCheck_String] := [Reg_Addr1][Reg_Addr2]
  2645. [StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789-.,#"
  2646. [StrCheck_Mask]   := BlankString
  2647. [StrCheck_Rc]     := 0
  2648. Do StrCheck
  2649. If [StrCheck_Rc] > 0
  2650.    IncrementNumber [RegUser_Count]
  2651.    [RegUser_Data][[RegUser_Count]] := Address (A-Z,Space,-.,#) only!
  2652. EndIf
  2653.  
  2654. ;; ----------------------------------
  2655. ;; Verify City information
  2656. ;;
  2657. :Verify_City
  2658. If [Reg_City] = BlankString
  2659.    IncrementNumber [RegUser_Count]
  2660.    [RegUser_Data][[RegUser_Count]] := City (No data entered)
  2661.    Goto Verify_State
  2662. EndIf
  2663. [StrCheck_String] := [Reg_City]
  2664. [StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTUVWXYZ "
  2665. [StrCheck_Mask]   := BlankString
  2666. [StrCheck_Rc]     := 0
  2667. Do StrCheck
  2668. If [StrCheck_Rc] > 0
  2669.    IncrementNumber [RegUser_Count]
  2670.    [RegUser_Data][[RegUser_Count]] := City (A-Z,Space) only!
  2671. EndIf
  2672.  
  2673. ;; ----------------------------------
  2674. ;; Verify State information
  2675. ;;
  2676. :Verify_State
  2677. If [Reg_State] = BlankString
  2678.    IncrementNumber [RegUser_Count]
  2679.    [RegUser_Data][[RegUser_Count]] := State (No data entered)
  2680.    Goto Verify_Zip
  2681. EndIf
  2682. [StrCheck_String] := [Reg_State]
  2683. [StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  2684. [StrCheck_Mask]   := BlankString
  2685. [StrCheck_Rc]     := 0
  2686. Do StrCheck
  2687. If [StrCheck_Rc] > 0
  2688.    IncrementNumber [RegUser_Count]
  2689.    [RegUser_Data][[RegUser_Count]] := State (A-Z) only!
  2690. EndIf
  2691.  
  2692. ;; ----------------------------------
  2693. ;; Verify Zip information
  2694. ;;
  2695. :Verify_Zip
  2696. [NUmber29] := LengthOf [Reg_Zip]
  2697. If [NUmber29] <> 5
  2698.    IncrementNumber [RegUser_Count]
  2699.    [RegUser_Data][[RegUser_Count]] := Zip Code (5 digits required)
  2700.    Goto Verify_Phone
  2701. EndIf
  2702. If [Reg_Zip] = BlankString
  2703.    IncrementNumber [RegUser_Count]
  2704.    [RegUser_Data][[RegUser_Count]] := Zip Code (No data entered)
  2705.    Goto Verify_Phone
  2706. EndIf
  2707. [StrCheck_String] := [Reg_Zip]
  2708. [StrCheck_Valid]  := "0123456789-"
  2709. [StrCheck_Mask]   := BlankString
  2710. [StrCheck_Rc]     := 0
  2711. Do StrCheck
  2712. If [StrCheck_Rc] > 0
  2713.    IncrementNumber [RegUser_Count]
  2714.    [RegUser_Data][[RegUser_Count]] := Zip (0-9,-) only!
  2715. EndIf
  2716.  
  2717. ;; ----------------------------------
  2718. ;; Verify Phone information
  2719. ;;
  2720. :Verify_Phone
  2721. [StrCheck_String] := [Reg_Phone]
  2722. [StrCheck_Valid]  := "0123456789-() "
  2723. [StrCheck_Mask]   := BlankString
  2724. [StrCheck_Rc]     := 0
  2725. Do StrCheck
  2726. If [StrCheck_Rc] > 0
  2727.    IncrementNumber [RegUser_Count]
  2728.    [RegUser_Data][[RegUser_Count]] := Phone (0-9,(,),-,Space) only!
  2729. EndIf
  2730.  
  2731. ;; ----------------------------------
  2732. ;; Verify CC Exp Date Entry
  2733. ;;
  2734. :Verify_ExpDate
  2735. If [Exp_Month] = BlankString
  2736.    IncrementNumber [RegUser_Count]
  2737.    [RegUser_Data][[RegUser_Count]] := Expiration Date (No month entered)
  2738. EndIf
  2739.  
  2740. [Number1] := LengthOf [Exp_Year]
  2741. If [Number1] = 0
  2742.    IncrementNumber [RegUser_Count]
  2743.    [RegUser_Data][[RegUser_Count]] := Expiration Date (No year Entered)
  2744. EndIf
  2745.  
  2746. ;; ----------------------------------
  2747. ;; Verify CCard
  2748. ;;
  2749. LoadDll [Dll1] ShadowDirectory\ZClient.Dll
  2750.  
  2751. CallDll [Dll1] HuValidateCCNumber ([Reg_CCNo]) Returns short [Call_Rc]
  2752. SetMouseCursor Arrow
  2753. If [Call_Rc] = 0
  2754.    UnLoadDll [Dll1]
  2755.    IncrementNumber [RegUser_Count]
  2756.    [RegUser_Data][[RegUser_Count]] := Invalid Credit Card Number ([Reg_CCNo])
  2757.  
  2758.  Else
  2759.   UnLoadDll [Dll1]
  2760. EndIf
  2761.  
  2762. [RegUser_Idx] := LastIndexUsedFor [RegUser_Data]
  2763.  
  2764. ClearScreen
  2765. UnLoadBitMap 13
  2766. Delay 1
  2767.  
  2768. If [RegUser_Idx] > 0
  2769.    ClearArray [Array1]
  2770.    Beep
  2771.    Beep 
  2772.    DialogBox  @xy(Center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader "Invalid or Missing Data"  ;;F:\VR\SCRIPTS\INSTTYPE.DBB
  2773.       Font "MS Sans Serif" 8
  2774.       Bitmap @xy(8,7) Bitmap 14
  2775.       LText @xy(84,7) 181 30 "One or more required fields have missing or invalid data. Please refer to the list below and make the necessary corrections."
  2776.       LText @xy(84,45) 181 23 "The following fields have missing or invalid data."
  2777.       ListBox @xy(84,55) 160 80 Uses [String28] LoadWith [RegUser_Data]
  2778.       Static @xy(8,140) 269 1 "" BlackRect
  2779.       PushButton @xy(180,145) 45 15 "< Back " 200
  2780.       PushButton @xy(232,145) 45 15 "Cancel" 300
  2781.    EndDialogBox
  2782.  
  2783.    If [Dialog_rc] = 300
  2784.       Do ExitConfirm
  2785.    EndIf
  2786.  
  2787.    Do Pb_ExitOn
  2788.  
  2789.    Exit
  2790. EndIf
  2791.  
  2792. ;; Password screen
  2793. ;;
  2794. :GetUserPsw
  2795. [Reg_SchoolId] := BlankString
  2796. If "[Reg_SchoolIdX]" = "Other" .And. [Reg_OSFRb] = 4
  2797.  
  2798.     [String1] := BlankString
  2799.  
  2800.     DialogBox RegScreen @xy(CenterScreen,CenterScreen) 160 85 Returns [Dialog_Rc] BlackOnWhite UseHeader "Enter Password"
  2801.       Font "MS Sans Serif" 8
  2802.       LText @xy(12,6) 136 30 "Please enter your password. Once you have entered a valid password, click 'OK' to continue."
  2803.       EditText @xy(45,44) 70 12 Uses [String1] PassWord Uppercase
  2804.       PushButton @xy(20,65) 50 15 "Cancel" 200 
  2805.       DefPushButton @xy(87,65) 50 15 "OK" 300 
  2806.     EndDialogBox
  2807.  
  2808.     If [Dialog_Rc] = 200
  2809.        Goto VCC_Display
  2810.     EndIf
  2811.  
  2812.     [String2] := CrcOfString [String1]
  2813.  
  2814.     If [String2] <> 2D84
  2815.        Beep
  2816.        Beep
  2817.        Goto GetUserPsw
  2818.       Else
  2819.        [Reg_SchoolId] := 999
  2820.     EndIf
  2821. EndIf
  2822.  
  2823. :VCC_Display
  2824.  
  2825. ;; Verify that the user wants to use the credit card
  2826. ;;
  2827. SetMouseCursor Wait
  2828. [StringS] := Your credit card is about to be charged $19.95 plus applicable taxes for [Infobase_Title]. Are you sure you wish to proceed? 
  2829. [StringS1] := Remember, thereÆs a MONEY-BACK GUARANTEE:  if youÆre not completely satisfied with the software within 30 days, run the uninstaller program supplied with the software, write down the code the uninstaller program will give you, and call us at 1-800-EMANUEL; weÆll cheerfully refund your money.
  2830.  
  2831. if [Reg_SchoolId] = 999
  2832.    [StringS1] := Your credit card will NOT be charged for this product.
  2833.    [StringS] := BlankString
  2834.    Goto CC_Check
  2835. EndIf
  2836.  
  2837.  
  2838. :CC_Check
  2839. DialogBox FinalScreen @xy(CenterScreen,CenterScreen) 200 120 Returns [Dialog_Rc] BlackOnWhite UseHeader "Credit Verification"
  2840.   Font "MS Sans Serif" 8
  2841.   LText @xy(12,6) 180 30 "[StringS]"
  2842.   LText @xy(12,35) 180 60 "[StringS1]"
  2843.   PushButton @xy(107,100) 50 15 "Submit Order" 300 
  2844.   PushButton @xy(40,100) 50 15 "Cancel Order" 200 
  2845.  
  2846. EndDialogBox
  2847.  
  2848. If [Dialog_Rc] = 200
  2849.    Do Pb_ExitOn
  2850.    Exit
  2851. EndIf
  2852.  
  2853.  
  2854. Exit DismissDialog 
  2855. Clearscreen
  2856. UpdateWindow
  2857.  
  2858.  
  2859. EndProcedure
  2860. Procedure StrCheck
  2861. ;;[StrCheck_String] := 
  2862. ;;[StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTU"
  2863. ;;[StrCheck_Mask]   := BlankString
  2864. ;;[StrCheck_Rc]     := 0
  2865.  
  2866. SetMouseCursor Wait
  2867.  
  2868. ;; AlphaOnly Check
  2869. [StrCheck_Len] := LengthOf [StrCheck_String]
  2870. [StrCheck_Cnt] := 0
  2871. While [StrCheck_Cnt] < [StrCheck_Len]
  2872.   IncrementNumber [StrCheck_Cnt]
  2873.   [StrCheck_Char] := SubStringOf [StrCheck_String] From [StrCheck_Cnt] to [StrCheck_Cnt]
  2874.   [StrCheck_Chk]  := PositionOf [StrCheck_Char] In [StrCheck_Valid]
  2875.   If [StrCheck_Chk] = 0
  2876.      [StrCheck_Rc] := 1
  2877.      Exit
  2878.   EndIf
  2879. EndWhile
  2880. EndProcedure
  2881. Procedure Check_Views31
  2882.  
  2883.  
  2884. ClearArray [Array1]
  2885. ClearArray [RegUser_Data]
  2886. [RegUser_Count] := 0
  2887.  
  2888. [Number1] := 0
  2889. [Number2] := LastIndexUsedFor [Views31Dirs]
  2890. While [Number1] < [Number2]
  2891.   IncrementNumber [Number1]
  2892.   [String1] := [Views31Dirs][[Number1]]
  2893.   If [String1] = [ScanIcons_ExePath] .And. [String1] <> BlankString
  2894.      Goto Check_Views31_Ok    
  2895.   EndIf
  2896. EndWhile
  2897.  
  2898. IncrementNumber [RegUser_Count]
  2899. [RegUser_Data][[RegUser_Count]] := Invalid Entry (Must select a listed directory)
  2900.  
  2901.  
  2902.    ClearArray [Array10]
  2903.    Beep
  2904.    Beep 
  2905.    DialogBox  @xy(center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader "Invalid or Missing Data" 
  2906.       Font "MS Sans Serif" 8
  2907.       Bitmap @xy(8,7) Bitmap 14
  2908.       LText @xy(84,7) 181 30 "One or more required fields have missing or invalid data. Please refer to the list below and make the necessary corrections."
  2909.       LText @xy(84,45) 181 23 "The following fields have missing or invalid data."
  2910.       ListBox @xy(84,55) 160 80 Uses [String28] LoadWith [RegUser_Data]
  2911.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  2912.       PushButton @xy(180,145) 45 15 "Next >" 200 Disabled
  2913.       PushButton @xy(135,145) 45 15 "< &Back" 100 
  2914.       PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  2915.       Static @xy(8,140) 269 1 "" BlackRect
  2916.    EndDialogBox
  2917.  
  2918.    If [Dialog_rc] = 300
  2919.       Do ExitConfirm
  2920.    EndIf
  2921.  
  2922.    Exit
  2923.  
  2924.  
  2925. :Check_Views31_Ok
  2926. IF [Invalid_Views] = True
  2927.    Exit
  2928. else
  2929.    [TViewsDir] := PathNameOf [ScanIcons_ExePath]
  2930.    [Invalid_Views] := False
  2931.  
  2932.    if FileExists [TViewsDir]\rightsmn.dll .And. FileExists [TViewsDir]\libstub.dll
  2933.       Exit DismissDialog 
  2934.    else
  2935.       [Invalid_Views] := True
  2936.       Exit DismissDialog
  2937.    EndIf
  2938. EndIf
  2939.  
  2940. EndProcedure
  2941. Procedure HomeAddress
  2942.  
  2943.  
  2944. [TRegH_Addr1] := [RegH_Addr1]
  2945. [TRegH_Addr2] := [RegH_Addr2]
  2946. [TRegH_City]  := [RegH_City]
  2947. [TRegH_State] := [RegH_State]
  2948. [TRegH_Zip]   := [RegH_Zip]
  2949. [TRegH_Phone] := [RegH_Phone]
  2950.  
  2951. :Address1
  2952.  
  2953. [Field_Error] := False
  2954.  
  2955. DialogBox HomeScreen @xy(CenterScreen,CenterScreen) 160 135 Returns [Dialog_Rc] BlackOnWhite UseHeader "Permanent Address"
  2956.       Font "MS Sans Serif" 8
  2957.       LText @xy(12,6) 150 40 "Add your permanent address here if your permanent address differs from your school address."
  2958.       LText @xy(12,35) 100 10 "Permanent Address"
  2959.       EditText @xy(12,45) 130 12 Uses [TRegH_Addr1] AutoHScroll Border
  2960.       EditText @xy(12,58) 130 12 Uses [TRegH_Addr2] AutoHScroll Border
  2961.       LText @xy(12,72) 36 10 "City"
  2962.       EditText @xy(12,82) 59 12 Uses [TRegH_City] AutoHScroll Border
  2963.       LText @xy(76,72) 21 10 "State"
  2964.       EditText @xy(76,82) 16 12 Uses [TRegH_State] Border UpperCase
  2965.       LText @xy(100,72) 39 10 "Zip Code"
  2966.       EditText @xy(100,82) 43 12 Uses [TRegH_Zip] Border
  2967.       LText @xy(12,97) 36 10 "Phone"
  2968.       EditText @xy(12,106) 59 12 Uses [TRegH_Phone] AutoHScroll Border
  2969.  
  2970.       PushButton ProcIs HAddr_Check @xy(93,98) 50 15 "OK" 100
  2971.       PushButton @xy(93,115) 50 15 "Cancel" 300 
  2972. EndDialogBox
  2973.  
  2974. if [Field_Error] = True
  2975.    goto Address1
  2976. EndIf
  2977.  
  2978. If [Dialog_Rc] = 100
  2979.      [RegH_Addr1]    := [TRegH_Addr1]
  2980.      [RegH_Addr2]    := [TRegH_Addr2]
  2981.      [RegH_City]     := [TRegH_City]
  2982.      [RegH_State]    := [TRegH_State]
  2983.      [RegH_Zip]      := [TRegH_Zip]
  2984.      [RegH_Phone]    := [TRegH_Phone]
  2985. EndIf
  2986.  
  2987. EndProcedure
  2988. Procedure StudentType
  2989.  
  2990. if [Reg_OSFRb] = 1
  2991.  
  2992.         EnableWindow RegScreen.CB_GradYear
  2993. ;;        EnableWindow RegScreen.CB_LawReview
  2994. ;;        EnableWindow RegScreen.CB_LawReview1
  2995.  
  2996.     else
  2997.  
  2998.         EnableWindow RegScreen.CB_GradYear Off
  2999. ;;        EnableWindow RegScreen.CB_LawReview Off
  3000. ;;        EnableWindow RegScreen.CB_LawReview1 Off
  3001.  
  3002.  [Reg_CBLawReview] := 0
  3003.  [Reg_CBLawReview1] := 0
  3004.  
  3005. Endif
  3006.  
  3007.  
  3008. ;;    if [Reg_OSFRb] = 4 .And. [Reg_SchoolId] = Other
  3009. ;;
  3010. ;;        DialogBox @xy(center,center) 100 86 Returns [PassW] BlackOnLightGray UseHeader "Emanuel Electronic Format Password"
  3011. ;;          Font "MS Sans Serif" 8
  3012. ;;          LText @xy(8,17) 80 30 "Please enter your password:"
  3013. ;;          EditText @xy(12,30) 10 10 Uses [PWord] Border UpperCase PassWord
  3014. ;;          DefPushButton @xy(54,68) 38 14 "OK" 100
  3015. ;;        EndDialogBox
  3016. ;;        
  3017. ;;        Dialog
  3018. ;;          The password is [PWord]
  3019. ;;        EndDialog
  3020. ;;    Endif
  3021. ;; Must encrypt password and set school to 999
  3022. ;;    if [PWord] = EDU
  3023. ;;        Reg_Sl_Number := 999
  3024. ;;        Dialog
  3025. ;;           Your credit card will NOT be charged.
  3026. ;;        EndDialog
  3027. ;;    else
  3028. ;;        Dialog
  3029. ;;           Your credit card will be charged.
  3030. ;;        EndDialog
  3031. ;;    Endif
  3032.  
  3033. EndProcedure
  3034. Procedure CreditVer
  3035.  
  3036. DialogBox @xy(100,100) 100 150 UseHeader "Credit Verification" Returns [Credit_Rc]
  3037.   Font "MS Sans Serif" 8
  3038.       LText @xy(8,10) 90 80 "Your credit card is about to be charged for [Infobase_Title]. Once online registration is successful, the final price will be displayed, and installation will proceed." 
  3039.       LText @xy(8,50) 90 80 "Are you sure you wish to proceed?"
  3040.   PushButton @xy(20,95) 50 15 "OK" 200 
  3041.   PushButton @xy(20,95) 50 15 "Cancel" 300 
  3042. EndDialogBox
  3043.  
  3044.  
  3045.  
  3046. EndProcedure
  3047. Procedure OnLine_Check
  3048.  
  3049. If AccessCodeIsValid [Str2]
  3050.  
  3051. ;;   [RC4Key1] := [Str2]
  3052.    
  3053.    [RC4Key1] := AccessCode [Str2]
  3054.  
  3055.    Exit DismissDialog
  3056. EndIf
  3057.  
  3058. Beep
  3059. Beep
  3060.  
  3061. EndProcedure
  3062. Procedure SendData
  3063.  
  3064. :SendData_Init
  3065. SetMouseCursor Wait
  3066.  
  3067. UnLoadBitMap 13
  3068. ClearScreen
  3069. LoadBitMap 13 ShadowDirectory\OneM.Bmp
  3070. ShowBitMap 13 @xy(Center,Center)
  3071. TextOut OnBitMap 13 @xy(60,17) Checking Modem Configuration ...
  3072. Delay 1
  3073.  
  3074. UpdateWindow
  3075. [LdError] := 0
  3076.  
  3077. :Init_Dll
  3078. [LdError] := 0
  3079.  
  3080. [String1] := ShadowDirectory
  3081. If FileIsInUse [String1]\ZClient.Dll 
  3082.  
  3083.    If [LdError] < 5
  3084.       IncrementNumber [LdError]
  3085.       LoadDll [Dll1] ShadowDirectory\ZClient.Dll 
  3086.       CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3087.       UnLoadDll [Dll1]
  3088.       UnLoadDll [Dll1]
  3089.       Goto Init_Dll
  3090.    EndIf
  3091.  
  3092.    [Err_Desc] := 'Communications DLL init Failure'
  3093.    [Err_Text] := The communications DLL has failed to init properly. You select 'Re-Try' or reboot your system to clear this condition.
  3094.    do ErrorMsg
  3095.    
  3096.       If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3097.          Exit
  3098.       EndIf
  3099.       If [Dialog_Rc] = 200
  3100.          LoadDll [Dll1] ShadowDirectory\ZClient.Dll 
  3101.          CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3102.          UnLoadDll [Dll1]
  3103.          UnLoadDll [Dll1]
  3104.          Goto SendData_Init
  3105.       EndIf
  3106. EndIf
  3107.  
  3108. LoadDll [Dll1] ShadowDirectory\ZClient.Dll 
  3109. If DllError <> 0
  3110.    UnLoadBitMap 13
  3111.    ClearScreen
  3112.    [Err_Desc] := 'Communications DLL load Failure'
  3113.    [Err_Text] := The communications DLL has failed to load properly. You select 'Re-Try' or reboot your system to clear this condition.
  3114.    CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3115.    do ErrorMsg
  3116.    
  3117.    If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3118.       Exit
  3119.    EndIf
  3120.    If [Dialog_Rc] = 200
  3121.       Goto SendData_Init
  3122.    EndIf
  3123. EndIf
  3124.  
  3125. CallDll [Dll1] AutoDetectPort () Returns short [Call_Rc]
  3126. If [Call_Rc] <> 0
  3127.    UnLoadDll [Dll1]  
  3128.    UnLoadBitMap 13
  3129.    ClearScreen
  3130.    [String1] := 'Error initializing communications. ([Call_Rc])'
  3131.    [Err_Desc] := [String1]
  3132.    [Err_Text] := Make sure that your modem, phone line, and cable are properly connected. Verify that your modem has been reset before attempting 'ReTry'.
  3133.    do ErrorMsg   
  3134.    
  3135.    If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3136.       Exit
  3137.    EndIf
  3138.    If [Dialog_Rc] = 200
  3139.       Goto SendData_Init
  3140.    EndIf
  3141. EndIf
  3142.  
  3143. ;;UnLoadBitMap 13
  3144. ;;ClearScreen
  3145.  
  3146. ;;LoadBitMap 13 ShadowDirectory\OneM.Bmp
  3147. ;;ShowBitMap 13 @xy(Center,Center)
  3148. ;;TextOut OnBitMap 13 @xy(60,17) Connecting to the Emanuel
  3149. ;;TextOut OnBitMap 13 @xy(60,33) Online Registration System ...
  3150. ;;Delay 1000
  3151.  
  3152. UnLoadBitMap 13
  3153. ClearScreen
  3154.  
  3155. LoadBitMap 13 ShadowDirectory\OneM.Bmp
  3156. ShowBitMap 13 @xy(Center,Center)
  3157. TextOut OnBitMap 13 @xy(60,17) Dialing the Emanuel
  3158. TextOut OnBitMap 13 @xy(60,33) Online Registration System ...
  3159. Delay 1
  3160.  
  3161. CallDll [Dll1] DialNumber ([Dial_Number]) Returns short [Call_Rc]
  3162. If [Call_Rc] = -101
  3163.    UnLoadDll [Dll1]  
  3164.    UnLoadBitMap 13
  3165.    ClearScreen
  3166.    Do LineBusy
  3167.    If [Dialog_Rc] = 300
  3168.       Exit
  3169.    EndIf
  3170.    Goto SendData_Init
  3171. EndIf
  3172.  
  3173. If [Call_Rc] <> 0
  3174.    [Err_Desc] := 'Error while dialing number.([Call_Rc])'
  3175.    [Err_Text] := Unable to connect to the Emanuel Server. Please make sure that your modem is configured properly and able to connect to an outside phone line.
  3176.    CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3177.    UnLoadDll [Dll1]  
  3178.    UnLoadBitMap 13
  3179.    ClearScreen
  3180.    do ErrorMsg   
  3181.    
  3182.    If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3183.       Exit
  3184.    EndIf
  3185.    If [Dialog_Rc] = 200
  3186.       Goto SendData_Init
  3187.    EndIf
  3188. EndIf
  3189.  
  3190. UnLoadBitMap 13
  3191. ClearScreen
  3192.  
  3193. LoadBitMap 13 ShadowDirectory\OneM.Bmp
  3194. ShowBitMap 13 @xy(Center,Center)
  3195. TextOut OnBitMap 13 @xy(60,17) Signing on to Emanuel
  3196. TextOut OnBitMap 13 @xy(60,33) Online Registration System ...
  3197. UpdateWindow
  3198.  
  3199. [String1] := Emanuel Outlines
  3200. CallDll [Dll1] LoginSequence ([String1]) Returns short [Call_Rc]
  3201.  
  3202. If [Call_Rc] <> 0
  3203.    [Err_Desc] := 'Server LoginSequence Error'
  3204.    [Err_Text] := Unable to login to server. Unknown errors while attempting to login.
  3205.    UnLoadBitMap 13
  3206.    ClearScreen
  3207.  
  3208.    CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3209.    UnLoadDll [Dll1]  
  3210.    do ErrorMsg   
  3211.  
  3212.    
  3213.    If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3214.       Exit
  3215.    EndIf
  3216.    If [Dialog_Rc] = 200
  3217.       Goto SendData_Init
  3218.    EndIf
  3219. EndIf
  3220.  
  3221. [String1] := E   ;; Payware=R
  3222. CallDll [Dll1] StartMenuSequence ([String1]) Returns short [Call_Rc]
  3223.  
  3224. If [Call_Rc] <> 0
  3225.    [Err_Desc] := 'Server StartMenuSequence Error'
  3226.    [Err_Text] := Unable to start server menu. Unknown errors occurred while starting a transaction.
  3227.  
  3228.    UnLoadBitMap 13
  3229.    ClearScreen
  3230.  
  3231.    CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3232.    UnLoadDll [Dll1]  
  3233.    do ErrorMsg   
  3234.  
  3235.    
  3236.    If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3237.       Exit
  3238.    EndIf
  3239.    If [Dialog_Rc] = 200
  3240.       Goto SendData_Init
  3241.    EndIf
  3242. EndIf
  3243.  
  3244. ;; Load Senddata
  3245.  
  3246. SetTokenDelimiterTo ,
  3247. [S_Count] := 0
  3248. [S_Text]  := BlankString
  3249.  
  3250. UnLoadBitMap 13
  3251. ClearScreen
  3252.  
  3253. LoadBitMap 13 ShadowDirectory\OneM.Bmp
  3254. ShowBitMap 13 @xy(Center,Center)
  3255. TextOut OnBitMap 13 @xy(60,25) Processing Online Registration Form ...
  3256. UpdateWindow
  3257.  
  3258. ClearArray [Array1]
  3259. [Array1] := [WindowsDirectory]\ELForms.Dat
  3260.  
  3261. ;;GetMenuChoice
  3262. ;;[Array1]
  3263. ;;EndGetMenuChoice
  3264.  
  3265. [Number1] := 0
  3266. [Number2] := LastIndexUsedFor [Array1]
  3267. [S_Count] := 0
  3268. SetTokenDelimiterTo =
  3269. ExamineTextFile [WindowsDirectory]\ELForms.Dat
  3270. [S_Text]  := BlankString
  3271. [Ts_Text] := Go!!
  3272.  
  3273. [Dialog_Rc] := 0
  3274.  
  3275. While [TS_text] <> BlankString
  3276.   IncrementNumber [S_Count]
  3277.   [TS_text] := Token 1 Of [Array1][[S_Count]]
  3278.   [String1] := Token 2 Of [Array1][[S_Count]]
  3279.  
  3280.   If [TS_text] = BlankString
  3281.      [S_Text] := ""<END>""
  3282.     Else
  3283.      [String2] := SettingFor [TS_text]
  3284.      [S_Text]  := ""[String2]""
  3285.   EndIf
  3286.  
  3287.   :SendData_Retry
  3288.   CallDll [Dll1] SendString ([S_Text]) Returns short [Call_Rc]
  3289.   If [Call_Rc] <> 0
  3290.      [Err_Desc] := 'SendString Error'
  3291.      [Err_Text] := An error occurred while sending data to the server.
  3292.      CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3293.      UnLoadDll [Dll1]  
  3294.      UnLoadBitMap 13
  3295.      do ErrorMsg   
  3296.      
  3297.      If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3298.         Exit
  3299.      EndIf
  3300.      If [Dialog_Rc] = 200 
  3301.         Goto SendData_Init
  3302.      EndIf
  3303.   EndIf
  3304.  
  3305. EndWhile 
  3306.  
  3307.  
  3308. ;; Execute (S1) option code if enabled, no download required
  3309. ;; normal installation
  3310. ;; -------------------------------
  3311. ;;
  3312. If [Call_Rc] = 0 .And. [Reg_Media] <> D
  3313.  
  3314.     UnLoadBitMap 13
  3315.     LoadBitMap 13 ShadowDirectory\OneM.Bmp
  3316.     ShowBitMap 13 @xy(Center,Center)
  3317.     TextOut OnBitMap 13 @xy(60,25) Processing Credit Card ...
  3318.  
  3319.    :GetKey 
  3320.    ;; Set instance code information and GetKey
  3321.    ;; 
  3322. ;;   [String1] := [Product_ID][Product_File]
  3323. ;;   SetProductClassTo "[String1]"  ;; required
  3324.  
  3325.    SetProductClassTo "SUPER PROGRAM II"  ;; required
  3326.    [String2]  := InstanceCode
  3327.    [S_Text]   := ""[String2]"" 
  3328.    ;; pad marker  "123456789012"
  3329.    [String1]  := ""            "" 
  3330.    [String30] := BlankString
  3331.  
  3332.    CallDll [Dll1] GetKey ([S_Text],[String1]) Returns short [Call_Rc]
  3333.  
  3334.    If [Call_Rc] <> 0
  3335.       [Err_Desc] := 'Access Code Error ([Call_Rc])'
  3336.       [Err_Text] := Error occurred while retrieving an access code from the server.
  3337.       CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3338.       UnLoadDll [Dll1]  
  3339.       UnLoadBitMap 13
  3340.       do ErrorMsg   
  3341.       
  3342.       If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3343.          Exit
  3344.       EndIf
  3345.       If [Dialog_Rc] = 200 
  3346.          Goto SendData_Init
  3347.       EndIf
  3348.    EndIf 
  3349.  
  3350.    If AccessCodeIsValid [String1]
  3351.       [RC4Key1] := AccessCode [String1]
  3352.      Else
  3353.       [Err_Desc] := 'Invalid Access Code Error'
  3354.       [Err_Text] := The access code [String1], as returned from the server is not a valid key.
  3355.       CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3356.       UnLoadDll [Dll1]  
  3357.       UnLoadBitMap 13
  3358.       do ErrorMsg   
  3359.       
  3360.       If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3361.          Exit
  3362.       EndIf
  3363.       If [Dialog_Rc] = 200 
  3364.          Goto SendData_Init
  3365.       EndIf
  3366.  
  3367.    EndIf
  3368.  
  3369.    ;; New price request handling code
  3370. ;; Start here
  3371. [Parse_Str] := [Price]
  3372. [Parse_Char] := "."
  3373. Do Parse
  3374.  
  3375. [String30] := [Parse_Tokens][1]
  3376. [String31] := [Parse_Tokens][2]
  3377. [Number32] := [String30][String31]
  3378. ;;PopUp [Number32]
  3379.  
  3380.    ;; Get price request and process credit card 
  3381.    ;;
  3382.    [S_Text] := ""<PR>""
  3383.                ;;123456789+123456789+123456789+123456789+123456789+123456789+123456789+123456789+
  3384.    [String1] := "    "
  3385.    [String2] := "                                                                                "
  3386.    CallDll [Dll1] PriceRequest([String1],[String2],[Number32] As Short) Returns Short [Call_Rc]
  3387.  
  3388.    ;;[Call_Rc] := 1   ;; TestLine
  3389.  
  3390.    ;;[String1] = 13 msg, continue
  3391.    ;;          = 14 msg, cancel
  3392.  
  3393. ;; New price request handling code
  3394. ;; End here 
  3395.  
  3396.  
  3397.    UnLoadBitMap 13
  3398.    Do Price_Check
  3399.  
  3400.    If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3401.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3402.        UnLoadDll [Dll1]  
  3403.        UnLoadBitMap 13
  3404.        do ErrorMsg   
  3405.        Exit
  3406.     EndIf
  3407.     If [Dialog_Rc] = 200 
  3408.        Goto SendData_Init
  3409.     EndIf
  3410.  
  3411.    CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3412.    UnLoadDll [Dll1]
  3413.    ClearScreen
  3414.    UnloadBitMap 13
  3415.    Do FinalPrice
  3416.  
  3417. EndIf
  3418.  
  3419. ;; Execute download (S4) option code if enabled
  3420. ;; -------------------------------
  3421. If [Reg_Media] = D
  3422.  
  3423.    :DownLoad_Retry
  3424.    ;; File will be placed into [InstallFromDirectory] location
  3425.    ;;
  3426.    [C_Dir] := [InstallFromDirectory]      
  3427.    [T_Dir] := [InstallationDirectory]
  3428.    CreateDirectoryIfNecessary [T_Dir]
  3429.    
  3430.    [Number1] := MainWindowHandle
  3431.    UnLoadBitMap 13
  3432.  
  3433.    CallDll [Dll1] DownLoadFile ([Number1] As Short,[T_Dir]) Returns short [Call_Rc]
  3434.  
  3435.    If [Call_Rc] <> 0
  3436.       [Err_Desc] := 'File Download Error ([Call_Rc])'
  3437.       [Err_Text] := Error during file download.
  3438.  
  3439.       CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3440.       UnLoadDll [Dll1]  
  3441.       UnLoadBitMap 13
  3442.       do ErrorMsg   
  3443.       
  3444.       If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3445.          Exit
  3446.       EndIf
  3447.       If [Dialog_Rc] = 200 
  3448.          Goto SendData_Init
  3449.       EndIf
  3450.    EndIf 
  3451.  
  3452.    ;; needed for download only
  3453.    CallDLL [DLL1] ClearBuffers()
  3454.  
  3455.    ModifyTextFile [WindowsDirectory]\LNForms.Dat NoBackUp
  3456.       AddOrChangeLineWith (DownLoad=,,) As "DownLoad=Y" At End
  3457.    EndModifyTextFile
  3458.  
  3459.    LoadBitMap 13 ShadowDirectory\OneM.Bmp
  3460.    ShowBitMap 13 @xy(Center,Center)
  3461.    TextOut OnBitMap 13 @xy(60,25) Processing Credit Card ...
  3462.  
  3463.    :S4_GetKey 
  3464.    ;; Set instance code information and GetKey
  3465.    ;; 
  3466. ;;   [String1] := [Product_ID][Product_File]
  3467. ;;   SetProductClassTo "[String1]"  ;; required
  3468.  
  3469.    SetProductClassTo "SUPER PROGRAM II"  ;; required
  3470.    [String2]  := InstanceCode
  3471.    [S_Text]   := ""[String2]"" 
  3472.    ;; pad marker  "123456789012"
  3473.    [String1]  := ""            "" 
  3474.  
  3475.    [String30] := "D"
  3476.    Delay 1000   
  3477.    CallDll [Dll1] GetKey ([S_Text],[String1]) Returns short [Call_Rc]
  3478.  
  3479.    If [Call_Rc] <> 0
  3480.       [Err_Desc] := 'Access Code Error ([Call_Rc])'
  3481.       [Err_Text] := Error occurred while retrieving an access code from the server.
  3482.  
  3483.       CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3484.       UnLoadDll [Dll1]  
  3485.       UnLoadBitMap 13
  3486.       do ErrorMsg   
  3487.       
  3488.       If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3489.          Exit
  3490.       EndIf
  3491.       If [Dialog_Rc] = 200 
  3492.          Goto SendData_Init
  3493.       EndIf
  3494.    EndIf 
  3495.  
  3496.    If AccessCodeIsValid [String1]
  3497.       [RC4Key1] := AccessCode [String1]
  3498.      Else
  3499.       [Err_Desc] := 'Invalid Access Code Error ([Call_Rc])'
  3500.       [Err_Text] := The access code [String1], as returned from the server is not a valid key.
  3501.       CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3502.       UnLoadDll [Dll1]  
  3503.       UnLoadBitMap 13
  3504.       do ErrorMsg   
  3505.       
  3506.       If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3507.          Exit
  3508.       EndIf
  3509.       If [Dialog_Rc] = 200 
  3510.          Goto SendData_Init
  3511.       EndIf
  3512.    EndIf
  3513.  
  3514.    ;; New price request handling code
  3515. ;; Start here
  3516. [Parse_Str] := [Price]
  3517. [Parse_Char] := "."
  3518. Do Parse
  3519.  
  3520. [String30] := [Parse_Tokens][1]
  3521. [String31] := [Parse_Tokens][2]
  3522. [Number32] := [String30][String31]
  3523. ;;PopUp [Number32]
  3524.  
  3525.    ;; Get price request and process credit card 
  3526.    ;;
  3527.    [S_Text] := ""<PR>""
  3528.                ;;123456789+123456789+123456789+123456789+123456789+123456789+123456789+123456789+
  3529.    [String1] := "    "
  3530.    [String2] := "                                                                                "
  3531.    CallDll [Dll1] PriceRequest([String1],[String2],[Number32] As Short) Returns Short [Call_Rc]
  3532.  
  3533.    ;;[Call_Rc] := 1   ;; TestLine
  3534.  
  3535.    ;;[String1] = 13 msg, continue
  3536.    ;;          = 14 msg, cancel
  3537.  
  3538. ;; New price request handling code
  3539. ;; End here 
  3540.  
  3541.    Do Price_Check
  3542.    If [Dialog_Rc] = 100 .Or. [Dialog_Rc] = 300
  3543.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3544.        UnLoadDll [Dll1]  
  3545.        UnLoadBitMap 13
  3546.        do ErrorMsg   
  3547.        Exit
  3548.     EndIf
  3549.     If [Dialog_Rc] = 200 
  3550.        Goto S4_GetKey
  3551.     EndIf
  3552.  
  3553.    CallDll [Dll1] Terminate() Returns short [Call_Rc]
  3554.    UnLoadDll [Dll1]
  3555.    ClearScreen
  3556.    UnloadBitMap 13
  3557.    Do FinalPrice
  3558.  
  3559.    [InstallFromDirectory] := [T_Dir]
  3560.    InstallSeries [Product_File].PVL
  3561.  
  3562. EndIf
  3563.  
  3564. UnLoadBitMap 13
  3565. ClearScreen
  3566.  
  3567. SetMouseCursor Arrow
  3568. goto InstallFiles
  3569. exit
  3570.  
  3571. EndProcedure
  3572.  
  3573. Procedure ErrorMsg
  3574.  
  3575. DialogBox RegScreen @xy(CenterScreen,CenterScreen) 160 130 Returns [Dialog_Rc] BlackOnWhite UseHeader "Installation Error" 
  3576.   Font "MS Sans Serif" 8
  3577.   LText @xy(5,6) 150 20 "The Automated Installation of [Infobase_Title] was unsuccessful:"
  3578.   LText @xy(9,30) 5 10 "╖"
  3579.   LText @xy(20,30) 140 20 "Press 'Retry' to restart the Automated Installation."
  3580.   LText @xy(9,50) 5 10 "╖"
  3581.   LText @xy(20,50) 140 20 "Press 'Next' to continue with a manual installation."
  3582.   LText @xy(9,70) 5 10 "╖"
  3583.   LText @xy(20,70) 140 20 "Press 'Cancel' to discontinue."
  3584.   PushButton @xy(8,105) 45 15 "Retry"  200
  3585.   PushButton @xy(57,105) 45 15 "Next >" 300 
  3586.   PushButton C_Button ProcIs ExitConfirm @xy(106,105) 45 15 "Cancel" 100
  3587. EndDialogBox
  3588.  
  3589. if [Dialog_Rc] = 100
  3590.    SoLong Quietly
  3591. EndIf
  3592.  
  3593. EndProcedure
  3594.  
  3595. Procedure CharFilter
  3596.  
  3597. [String1] := [Reg_LnId]      
  3598. [Reg_LnId] := SubStringOf [String1] From 1 To 50
  3599.  
  3600. [String1] := [Reg_FName]       
  3601. [Reg_FName]  := SubStringOf [String1] From 1 To 50
  3602.  
  3603. [String1] := [Reg_LName]      
  3604. [Reg_LName] := SubStringOf [String1] From 1 To 50
  3605.  
  3606. [String1] := [Reg_MName]     
  3607. [Reg_MName] := SubStringOf [String1] From 1 To 2
  3608.  
  3609. [String1] := [Reg_Addr1]      
  3610. [Reg_Addr1]  := SubStringOf [String1] From 1 To 50
  3611.  
  3612. [String1] := [Reg_Addr2]     
  3613. [Reg_Addr2] := SubStringOf [String1] From 1 To 50
  3614.  
  3615. [String1] := [Reg_City]     
  3616. [Reg_City] := SubStringOf [String1] From 1 To 50
  3617.  
  3618. [String1] := [Reg_State]    
  3619. [Reg_State] := SubStringOf [String1] From 1 To 2
  3620.  
  3621. [String1] := [Reg_Zip]    
  3622. [Reg_Zip] := SubStringOf [String1] From 1 To 5
  3623.  
  3624. [String1] := [Reg_Phone]    
  3625. [Reg_Phone] := SubStringOf [String1] From 1 To 16
  3626.  
  3627. [String1] := [RegH_Addr1]   
  3628. [RegH_Addr1] := SubStringOf [String1] From 1 To 50
  3629.  
  3630. [String1] := [RegH_Addr2]    
  3631. [RegH_Addr2] := SubStringOf [String1] From 1 To 50
  3632.  
  3633. [String1] := [RegH_City]    
  3634. [RegH_City] := SubStringOf [String1] From 1 To 50
  3635.  
  3636. [String1] := [RegH_State]    
  3637. [RegH_State] := SubStringOf [String1] From 1 To 2
  3638.  
  3639. [String1] := [RegH_Zip]   
  3640. [RegH_Zip] := SubStringOf [String1] From 1 To 5
  3641.  
  3642. [String1] := [RegH_Phone]   
  3643. [RegH_Phone] := SubStringOf [String1] From 1 To 16
  3644.  
  3645. [String1] := [Reg_SchoolId]   
  3646. [Reg_SchoolId] := SubStringOf [String1] From 1 To 3
  3647.  
  3648. [String1] := [Reg_GradYear]   
  3649. [Reg_GradYear] := SubStringOf [String1] From 1 To 4
  3650.  
  3651. [String1] := [Reg_Member]   
  3652. [Reg_Member] := SubStringOf [String1] From 1 To 1
  3653.  
  3654. [String1] := [Reg_CBLawReviewYn]   
  3655. [Reg_CBLawReviewYn] := SubStringOf [String1] From 1 To 1
  3656.  
  3657. [String1] := [Reg_CBLawReview1Yn]   
  3658. [Reg_CBLawReview1Yn] := SubStringOf [String1] From 1 To 1
  3659.  
  3660. [String1] := [Reg_EMail]  
  3661. [Reg_EMail] := SubStringOf [String1] From 1 To 80
  3662.  
  3663. [String1] := [Reg_Media]   
  3664. [Reg_Media] := SubStringOf [String1] From 1 To 1
  3665.  
  3666. [String1] := [Reg_InstallOS]  
  3667. [Reg_InstallOS] := SubStringOf [String1] From 1 To 3
  3668.  
  3669. [String1] := [Version_Number]  
  3670. [Version_Number] := SubStringOf [String1] From 1 To 3
  3671.  
  3672. [String1] := [Product_Id]
  3673. [Product_Id] := SubStringOf [String1] From 1 To 20
  3674.  
  3675. [String1] := [Reg_CCNo] 
  3676. [Reg_CCNo] := SubStringOf [String1] From 1 To 50
  3677.  
  3678. [String1] := [Reg_ExpDate] 
  3679. [Reg_ExpDate]  := SubStringOf [String1] From 1 To 5
  3680.  
  3681.  
  3682. EndProcedure
  3683. Procedure DialPreFix
  3684. UpdateWindow
  3685.  
  3686. DialogBox  @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader "Dial Prefix"
  3687.       Font "MS Sans Serif" 8
  3688.       BitMap @xy(8,7) BitMap 14
  3689.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  3690.       PushButton @xy(180,145) 45 15 "Next >" 200
  3691.       PushButton @xy(135,145) 45 15 "< &Back" 100 
  3692.       PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  3693.       Static @xy(8,140) 269 1 "" BlackRect
  3694.       LText @xy(84,7) 189 40 "You are about to dial into the Emanuel Electronic Format Online Registration System. This is a TOLL FREE call! If your phone requires a dial prefix in order to reach an outside line, please enter it now."
  3695.       LText @xy(84,70) 50 10 "Dial Prefix:"
  3696.       EditText @xy(130,70) 50 12 Uses [Dial_Prefix] AutoHScroll Border
  3697. EndDialogBox
  3698.  
  3699. [String1] := [Dial_Prefix]
  3700. [String2] := [Orig_Dial_Number]
  3701. [Dial_Number] := [String1][String2]
  3702.  
  3703. If [Dialog_Rc] = 300
  3704.    Do ExitConfirm
  3705. EndIf
  3706.  
  3707. EndProcedure
  3708. Procedure FinalPrice
  3709.  
  3710. If [Price_Return] > 0
  3711.    [Price_Total] := FormatNumber [Price_Return] Decimal
  3712.    [Price_Desc] := "Credit card number [Reg_CCNo] has been charged a total price of $[Price_Total]."
  3713. EndIf
  3714.  
  3715. If [Price_Return] = 0
  3716.    [Price_Desc] := "Your credit card has not been charged for this transaction."
  3717. EndIf
  3718.  
  3719. DialogBox  @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader "Total Price"
  3720.       Font "MS Sans Serif" 8
  3721.       BitMap @xy(8,8) BitMap 14
  3722.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  3723.       PushButton @xy(180,145) 45 15 "Next >" 200
  3724.       PushButton @xy(135,145) 45 15 "< &Back" 100 Disabled
  3725.       PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300 Disabled
  3726.       Static @xy(8,140) 269 1 "" BlackRect
  3727.       LText @xy(84,7) 189 40 "[Price_Desc]"
  3728.  
  3729.       LText @xy(84,70) 190 30 "Click 'Next' to install your selected product."
  3730. EndDialogBox
  3731.  
  3732.  
  3733. EndProcedure
  3734. Procedure PB_ExitOn
  3735.         EnableWindow RegScreen.Back On
  3736.         EnableWindow RegScreen.RegCheck On
  3737.         EnableWindow RegScreen.RegCancel On
  3738.         EnableWindow RegScreen.Pb_HomeAddr On
  3739. EndProcedure
  3740. Procedure NoProducts
  3741. :NoProd_test
  3742. SetTokenDelimiterTo ,
  3743. [Reg_Media] := D
  3744. [String11] := Invalid Product Id - ([Product_File])
  3745.  
  3746. [String10] := BlankString
  3747. [String1] := The PVL file for this installation does not contain an NFO base, or the specified product as specified via -P: is invalid. To install an NFO base product you must do so by selecting from the product list below, or via the command line using -P:{filename_below_with_no_file_extension}.
  3748. [Array2] := FileListFromLibrary *.IDD
  3749.  
  3750. DialogBox  @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader "[String11]" SysMenu ;;F:\VR\SCRIPTS\PROGROUP.DBB
  3751.       Font "MS Sans Serif" 8
  3752.       Static @xy(8,140) 269 1 "" BlackRect
  3753.       PushButton @xy(180,145) 45 15 "Next >" 200 
  3754.       PushButton @xy(136,145) 45 15 "< &Back" 100 Disabled
  3755.       PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  3756.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  3757.       LText @xy(84,7) 189 70 "[String1]"
  3758.       LText @xy(84,52) 59 12 "Catalog List:"
  3759.    ComboBox @xy(84,62) 191 70 Uses [String10] LoadWith [Array2] Border Sort
  3760. EndDialogBox
  3761.  
  3762. If [Dialog_Rc] = 300
  3763.    Do ExitConfirm
  3764. EndIf
  3765.  
  3766. If [Dialog_Rc] = 200
  3767.    If [String10] = BlankString
  3768.       Goto NoProd_test
  3769.    EndIf       
  3770.    [Cat_Select] := BlankString
  3771.    [String1] := [String10]
  3772. EndIf
  3773.  
  3774. EndProcedure
  3775. Procedure HAddr_Check
  3776. SetMouseCursor Wait
  3777.  
  3778. ClearArray [RegUser_Data]
  3779. [RegUser_Count] := 0
  3780. [BStr_Count]  := 0
  3781.  
  3782. ;; ----------------------------------
  3783. ;; Verify address information
  3784. ;;
  3785. :Verify_HAddr1
  3786. If [TRegH_Addr1] = BlankString .And. [TRegH_Addr2] = BlankString
  3787.    IncrementNumber [RegUser_Count]
  3788.    [RegUser_Data][[RegUser_Count]] := Home Address (No data entered)
  3789.    IncrementNumber [BStr_Count] 
  3790.    Goto Verify_HCity
  3791. EndIf
  3792. [StrCheck_String] := [TRegH_Addr1][TRegH_Addr2]
  3793. [StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789-.,#"
  3794. [StrCheck_Mask]   := BlankString
  3795. [StrCheck_Rc]     := 0
  3796. Do StrCheck
  3797. If [StrCheck_Rc] > 0
  3798.    IncrementNumber [RegUser_Count]
  3799.    [RegUser_Data][[RegUser_Count]] := Home Address (A-Z,Space,-.,#) only!
  3800. EndIf
  3801.  
  3802. ;; ----------------------------------
  3803. ;; Verify City information
  3804. ;;
  3805. :Verify_HCity
  3806. If [TRegH_City] = BlankString
  3807.    IncrementNumber [RegUser_Count]
  3808.    [RegUser_Data][[RegUser_Count]] := City (No data entered)
  3809.    IncrementNumber [BStr_Count]
  3810.    Goto Verify_HState
  3811. EndIf
  3812. [StrCheck_String] := [TRegH_City]
  3813. [StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTUVWXYZ "
  3814. [StrCheck_Mask]   := BlankString
  3815. [StrCheck_Rc]     := 0
  3816. Do StrCheck
  3817. If [StrCheck_Rc] > 0
  3818.    IncrementNumber [RegUser_Count]
  3819.    [RegUser_Data][[RegUser_Count]] := City (A-Z,Space) only!
  3820. EndIf
  3821.  
  3822. ;; ----------------------------------
  3823. ;; Verify State information
  3824. ;;
  3825. :Verify_HState
  3826. If [TRegH_State] = BlankString
  3827.    IncrementNumber [RegUser_Count]
  3828.    [RegUser_Data][[RegUser_Count]] := State (No data entered)
  3829.    IncrementNumber [BStr_Count]
  3830.    Goto Verify_HZip
  3831. EndIf
  3832. [StrCheck_String] := [TRegH_State]
  3833. [StrCheck_Valid]  := "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  3834. [StrCheck_Mask]   := BlankString
  3835. [StrCheck_Rc]     := 0
  3836. Do StrCheck
  3837. If [StrCheck_Rc] > 0
  3838.    IncrementNumber [RegUser_Count]
  3839.    [RegUser_Data][[RegUser_Count]] := State (A-Z) only!
  3840. EndIf
  3841.  
  3842. ;; ----------------------------------
  3843. ;; Verify Zip information
  3844. ;;
  3845. :Verify_HZip
  3846. [NUmber29] := LengthOf [TRegH_Zip]
  3847. If [NUmber29] = 0
  3848.    IncrementNumber [BStr_Count]
  3849. EndIf
  3850. If [NUmber29] <> 5
  3851.    IncrementNumber [RegUser_Count]
  3852.    [RegUser_Data][[RegUser_Count]] := Zip Code (0-9,-) only! Must be 5 digits.
  3853.    Goto Verify_HPhone
  3854. EndIf
  3855. [StrCheck_String] := [TRegH_Zip]
  3856. [StrCheck_Valid]  := "0123456789-"
  3857. [StrCheck_Mask]   := BlankString
  3858. [StrCheck_Rc]     := 0
  3859. Do StrCheck
  3860. If [StrCheck_Rc] > 0
  3861.    IncrementNumber [RegUser_Count]
  3862.    [RegUser_Data][[RegUser_Count]] := Zip Code (0-9,-) only! Must be 5 digits.
  3863. EndIf
  3864.  
  3865. ;; ----------------------------------
  3866. ;; Verify Phone information
  3867. ;;
  3868. :Verify_HPhone
  3869. If [TRegH_Phone] = BlankString
  3870.    IncrementNumber [BStr_Count]
  3871. EndIf
  3872. [StrCheck_String] := [TRegH_Phone]
  3873. [StrCheck_Valid]  := "0123456789-() "
  3874. [StrCheck_Mask]   := BlankString
  3875. [StrCheck_Rc]     := 0
  3876. Do StrCheck
  3877. If [StrCheck_Rc] > 0
  3878.    IncrementNumber [RegUser_Count]
  3879.    [RegUser_Data][[RegUser_Count]] := Phone (0-9,(,),-,Space) only!
  3880. EndIf
  3881.  
  3882. :HAddr_End
  3883. If [BStr_Count] = 5
  3884.    Exit DismissDialog 
  3885. EndIf
  3886.  
  3887. [RegUser_Idx] := LastIndexUsedFor [RegUser_Data]
  3888.  
  3889. ClearScreen
  3890. SetMouseCursor Arrow
  3891.  
  3892. If [RegUser_Idx] > 0
  3893.    ClearArray [Array1]
  3894.    Beep
  3895.    Beep 
  3896.    UpDateWindow
  3897.    DialogBox  @xy(Center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader "Permanent Address has missing or invalid data"  ;;F:\VR\SCRIPTS\INSTTYPE.DBB
  3898.       Font "MS Sans Serif" 8
  3899.       Bitmap @xy(8,7) Bitmap 14
  3900.       LText @xy(84,7) 181 30 "One or more required fields have missing or invalid data. Please refer to the list below and make the necessary corrections."
  3901.       LText @xy(84,45) 181 23 "The following fields have missing or invalid data."
  3902.       ListBox @xy(84,55) 160 80 Uses [String28] LoadWith [RegUser_Data]
  3903.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  3904.       PushButton @xy(180,145) 45 15 "Next >" 200 Disabled
  3905.       PushButton @xy(135,145) 45 15 "< &Back" 100 
  3906.       PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  3907.       Static @xy(8,140) 269 1 "" BlackRect
  3908.    EndDialogBox
  3909.  
  3910.    If [Dialog_rc] = 300
  3911.       Do ExitConfirm
  3912.    EndIf
  3913.  
  3914.   ;; Do Pb_ExitOn
  3915.  
  3916.    [Field_Error] := True
  3917.  
  3918.    Exit
  3919. EndIf
  3920.  
  3921. Exit DismissDialog 
  3922.  
  3923.  
  3924.  
  3925. EndProcedure
  3926. Procedure LineBusy
  3927. SetMouseCursor Wait
  3928. DialogBox BusyScreen @xy(CenterScreen,CenterScreen) 160 130 Returns [Dialog_Rc] BlackOnWhite UseHeader "Line Busy" Delay 20000
  3929.    Font "MS Sans Serif" 8
  3930.    LText @xy(12,6) 150 40 "The line is currently busy. An attempt to re-connect will be made every 20 seconds. Select 'Cancel' to abort re-dial."
  3931.    PushButton @xy(93,110) 50 12 "Cancel" 300 
  3932. EndDialogBox
  3933.  
  3934. SetMouseCursor Arrow
  3935.  
  3936.  
  3937. EndProcedure
  3938. Procedure SRefScreen
  3939. ;; ------------------------------
  3940. ;; Load GradYear list
  3941. ;; 
  3942. [GradYear_Beg]  := 1995
  3943. [GradYear_End]  := 0
  3944. While [GradYear_Beg] < 2002
  3945.   IncrementNumber [GradYear_End]
  3946.   [GradYear_Beg] := [GradYear_Beg] + 1
  3947.   [GradYear_List][[GradYear_End]] := [GradYear_Beg]
  3948. EndWhile
  3949.  
  3950. ;; [SRef_GradYear] := [GradYear_List][1]
  3951.  
  3952. if [SRef_Code] = BlankString .AND. [SRef_Name] = BlankString
  3953.    [Dialog_RbRStudent] := 3
  3954. else
  3955.    if [SRef_Code] = BlankString 
  3956.        [Dialog_RbRStudent] := 2
  3957.    else
  3958.        [Dialog_RbRStudent] := 1
  3959.    EndIf
  3960. EndIf
  3961.  
  3962. If [Dialog_RbRStudent] = 0
  3963.    [Dialog_RbRStudent] := 3
  3964.    [SRefCode_Disabled] := Disabled
  3965.    [Scr_Disabled] := Disabled
  3966. EndIf
  3967.  
  3968. If [Dialog_RbRStudent] = 1
  3969.    [SRefCode_Disabled] := BlankString
  3970.    [Scr_Disabled] := Disabled
  3971. EndIf
  3972.  
  3973. If [Dialog_RbRStudent] = 2
  3974.    [SRefCode_Disabled] := Disabled
  3975.    [Scr_Disabled] := BlankString
  3976. EndIf
  3977.  
  3978. If [Dialog_RbRStudent] = 3
  3979.    [SRefCode_Disabled] := Disabled
  3980.    [Scr_Disabled] := Disabled
  3981. EndIf
  3982.  
  3983. DialogBox SRef @xy(Center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader " Student Referral Information" 
  3984.   Font "MS Sans Serif" 8
  3985.   Bitmap @xy(8,7) Bitmap 14
  3986.  
  3987.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  3988.   PushButton @xy(180,145) 45 15 "Next >" 200
  3989.   PushButton @xy(135,145) 45 15 "< &Back" 100
  3990.   PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  3991.   Static @xy(8,140) 269 1 "" BlackRect
  3992.  
  3993.   LText @xy(80,7) 191 34 "If you heard about the EEF from another student, please enter that student's referral code or, if you do not have that student's code, enter his or her name and school so we may give them a referral fee:"
  3994.  
  3995. ;;  LText    @xy(90,47) 100 12 "Referring Student's Code:" 
  3996.   EditText ET_SRef_Code  @xy(190,47) 60 12 Uses [SRef_Code] Border UpperCase [SRefCode_Disabled]
  3997.  
  3998. ;;  LText @xy(88,75) 100 12 "Referring Student's Name:       " 
  3999.   EditText ET_SRef_Name @xy(190,75) 80 12 Uses [SRef_Name] AutoHScroll Border [Scr_Disabled]
  4000.  
  4001.   LText @xy(89,88) 100 12 "Referring Student's School:    " 
  4002.   EditText ET_SRef_School @xy(190,88) 80 12 Uses [SRef_School] AutoHScroll Border [Scr_Disabled]
  4003.  
  4004.   RadioButtonGroup SRefRB ProcIs SRef_OnOff Uses [Dialog_RbRStudent]
  4005.       RadioButton @xy(80,46)  100 10 "Referring Student's Code:"
  4006.       RadioButton @xy(80,74)  100 10 "Referring Student's Name:"
  4007.       RadioButton @xy(80,120) 170 10 "I was not referred to this software by a student."
  4008.  
  4009.  
  4010. EndDialogBox
  4011.  
  4012. If [Dialog_Rc] = 300
  4013.    Do ExitConfirm
  4014. EndIf
  4015.  
  4016. EndProcedure
  4017. Procedure BkstoreId
  4018.  
  4019. :BookId
  4020.  
  4021. If [Reg_CBStore] = 2
  4022.    [BkSt_Name] := BlankString
  4023. EndIf
  4024.  
  4025. DialogBox BksInput @xy(Center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader " Bookstore Information" 
  4026.   Font "MS Sans Serif" 8
  4027.   Bitmap @xy(8,7) Bitmap 14
  4028.  
  4029.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4030.   PushButton @xy(180,145) 45 15 "Next >" 200
  4031.   PushButton @xy(135,145) 45 15 "< &Back" 100
  4032.   PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  4033.   Static @xy(8,140) 269 1 "" BlackRect
  4034.  
  4035.   LText @xy(90,10) 180 40 "If you got this Product from a bookstore, enter the name or code of that bookstore (the name is printed on the outside of the packaging). If you did not get it from a bookstore, enter the name of the bookstore from which you regularly purchase your law school study aids."
  4036.   EditText BKS_Edit @xy(90,86) 150 12 Uses [BkSt_Name] [Bks_Disabled] 
  4037.  
  4038.   RadioButtonGroup SBookRB ProcIs BkstoreId_Check Uses [Reg_CBStore]
  4039.       RadioButton @xy(80,70)  160 12 "The bookstore's name or code is:"
  4040.       RadioButton @xy(80,115)  160 12 "Don't know the bookstore's name or code."
  4041.  
  4042. EndDialogBox
  4043.  
  4044. if [Dialog_Rc] = 200
  4045.     If [Reg_CBStore] = 2 .Or. [BkSt_Name] <> BlankString
  4046.        Exit
  4047.     else
  4048.        Dialog UserHeader "Bookstore Name Required"
  4049.        Enter the bookstore's name if you know it; otherwise, 
  4050.        select "Don't know the bookstore's name."
  4051.        EndDialog     
  4052.        goto BookId
  4053.     endif
  4054. EndIf
  4055. If [Dialog_Rc] = 300
  4056.    Do ExitConfirm
  4057. EndIf
  4058.  
  4059. EndProcedure
  4060. Procedure SRef_OnOff
  4061.  
  4062. If [Dialog_RbRStudent] = 1
  4063.  
  4064.        EnableWindow SRef.ET_SRef_Code On
  4065.  
  4066.        EnableWindow SRef.ET_SRef_Name OFF
  4067.       EnableWindow SRef.ET_SRef_School OFF
  4068.       [SRef_Name] := BlankString
  4069.       [SRef_School] := BlankString
  4070.       [SRefCode_Disabled] := BlankString
  4071.       [Scr_Disabled] := Disabled
  4072.  
  4073.       UpdateWindow SRef
  4074.       Exit
  4075.  Else
  4076.    If [Dialog_RbRStudent] = 2
  4077.  
  4078.        EnableWindow SRef.ET_SRef_Code Off
  4079.  
  4080.       EnableWindow SRef.ET_SRef_Name On
  4081.       EnableWindow SRef.ET_SRef_School On
  4082.       [SRef_Code] := BlankString
  4083.       [SRefCode_Disabled] := Disabled
  4084.       [Scr_Disabled] := BlankString
  4085.  
  4086.       UpdateWindow SRef
  4087.       Exit
  4088.    Else
  4089.        EnableWindow SRef.ET_SRef_Code Off
  4090.  
  4091.       EnableWindow SRef.ET_SRef_Name Off
  4092.       EnableWindow SRef.ET_SRef_School Off
  4093.  
  4094.       [SRef_Name] := BlankString
  4095.       [SRef_School] := BlankString
  4096.       [SRef_Code] := BlankString
  4097.  
  4098.       [Scr_Disabled] := Disabled
  4099.       [SRefCode_Disabled] := Disabled
  4100.  
  4101.       UpdateWindow SRef
  4102.       Exit
  4103.    EndIf
  4104. EndIf
  4105.  
  4106.  
  4107. EndProcedure
  4108. Procedure StRefInquiry
  4109. [Number25] := RGB(0,0,0)           ;;custom foreground color
  4110. [Number26] := RGB(192,192,192)     ;;custom background color
  4111.  
  4112. DialogBox @xy(center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader "Student Referrer Program"
  4113.   Font "MS Sans Serif" 8
  4114.   Bitmap @xy(8,7) Bitmap 14
  4115.   LText @xy(81,7)  191 30 "The Student Referrer Program makes you eligible for referral fees on sales of the software to people you tell about the software, the people they tell and so forth."
  4116.  
  4117.   LText @xy(81,40)  191 20 "Would you like additional information on how to become a Student Referrer of Emanuel Electronic Format software?"
  4118.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4119.  
  4120.   PushButton @xy(180,145) 45 15 "Next >" 200
  4121.   PushButton @xy(135,145) 45 15 "< Back" 100 
  4122.   PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  4123.   Static @xy(8,140) 269 1 "" BlackRect
  4124.  
  4125.   RadioButtonGroup Uses [Dialog_RbYesNo]
  4126.       RadioButton @xy(80,67) 35 10 "Yes"
  4127.       RadioButton @xy(80,90) 35 10 "No"
  4128.  
  4129. EndDialogBox
  4130.  
  4131. If [Dialog_Rc] = 300
  4132.    Do ExitConfirm
  4133. EndIf
  4134.  
  4135.  
  4136. EndProcedure
  4137. Procedure SrReadme
  4138. ;;BrowseFile [InstallFromDirectory]\StRef.Txt
  4139.  
  4140. [Array1] := ShadowDirectory\StRef.Txt
  4141. [String1] := BlankString
  4142.  
  4143. ;; Prompt user for new program group name
  4144. DialogBox  @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader "Student Referrer Additional Information"
  4145.       Font "MS Sans Serif" 8
  4146.       BitMap @xy(8,8) BitMap 14
  4147.       Static @xy(8,140) 269 1 "" BlackRect
  4148.       PushButton @xy(180,145) 45 15 "Next >" 200
  4149.       PushButton @xy(136,145) 45 15 "< &Back" 100
  4150.       PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  4151.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4152.       ListBox @xy(84,8) 191 125 Uses [String1] LoadWith [Array1] Border AutoHScroll
  4153. EndDialogBox
  4154.  
  4155. If [Dialog_Rc] = 300
  4156.    Do ExitConfirm
  4157. EndIf
  4158. EndProcedure
  4159. Procedure JoinYesNo
  4160. [Number25] := RGB(0,0,0)           ;;custom foreground color
  4161. [Number26] := RGB(192,192,192)     ;;custom background color
  4162.  
  4163. DialogBox @xy(center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader "View Additional Information"
  4164.   Font "MS Sans Serif" 8
  4165.   Bitmap @xy(8,7) Bitmap 14
  4166.  
  4167.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4168.   PushButton @xy(180,145) 45 15 "Next >" 200
  4169.   PushButton @xy(135,145) 45 15 "< Back" 100 
  4170.   PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  4171.   Static @xy(8,140) 269 1 "" BlackRect
  4172.  
  4173.   LText @xy(81,7)  191 20 "Would you like to join the Student Referrer Program? Please do not join again if you have already signed up."
  4174.   RadioButtonGroup Uses [Dialog_RbYesNo1]
  4175.       RadioButton @xy(80,67) 100 10 "Yes "
  4176.       RadioButton @xy(80,90) 100 10 "No "
  4177.  
  4178. EndDialogBox
  4179.  
  4180. If [Dialog_RbYesNo1] = 1
  4181.    if [Student_Code] = BlankString
  4182.       Do GenStudentCode
  4183.       [New_Student] := Yes
  4184.    Else
  4185.     [New_Student] := No
  4186.    EndIf
  4187. Else
  4188.    [Student_Code] := BlankString
  4189. EndIf
  4190.  
  4191. If [Dialog_Rc] = 300
  4192.    Do ExitConfirm
  4193. EndIf
  4194.  
  4195.  
  4196. EndProcedure
  4197. Procedure JoinYes
  4198.  
  4199. [Number25] := RGB(0,0,0)           ;;custom foreground color
  4200. [Number26] := RGB(192,192,192)     ;;custom background color
  4201.  
  4202. if [New_Student] = Yes
  4203.    [StringS] := You have been registered with the Emanuel Electronic Format Student Referrer Program. You may now begin to receive referral fees, pending verification of the information as submitted. If all of the information is accurate, you will receive your first referral fee check within 2 months.
  4204. else
  4205.    [StringS] := You have previously registered with the Emanuel Electronic Format Student Referrer Program.
  4206. EndIf
  4207.  
  4208. DialogBox @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader "EEF Student Referrer Registration Complete"
  4209.   Font "MS Sans Serif" 8
  4210.   Bitmap @xy(8,7) Bitmap 14
  4211.  
  4212.   LText @xy(80,7) 191 30 "Thank you for joining the EEF Program."
  4213.   LText @xy(80,27) 191 50 "[StringS]"
  4214.   LText @xy(80,80) 190 50 "Your Student Referrer Code: "
  4215.   LText @xy(130,95) 190 20 "[Student_Code]"
  4216.   LText @xy(80,115) 190 30 "Please write down this code so that you can provide it to other students."
  4217.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4218.   PushButton @xy(180,145) 45 15 "Next >" 200
  4219.   PushButton @xy(135,145) 45 15 "< Back" 100 
  4220.   PushButton C_Button ProcIs ExitConFirm @xy(232,145)  45 15 "Cancel" 300
  4221.   Static @xy(8,140) 269 1 "" BlackRect
  4222.  
  4223. EndDialogBox
  4224.  
  4225. If [Dialog_Rc] = 300
  4226.    Do ExitConfirm
  4227. EndIf
  4228.  
  4229.  
  4230. EndProcedure
  4231. Procedure QueDemoFiles
  4232. Quefilegroup 23 To [IDIR_Demo]
  4233. EndProcedure
  4234. Procedure AddVShare
  4235. [AddVShare_ChkSec] := PositionOf Quietly in [AddVShare_Options]
  4236. If [AddVShare_ChkSec] = 0
  4237.    ShowBitMap 13 @xy(Center,Center)
  4238.    Delay 1
  4239.    TextOut @xy(Center,Center) Verifying installation of vshare ....
  4240.    Delay 3000
  4241. EndIf
  4242.  
  4243. If WindowsNT 
  4244.    Exit
  4245. EndIf
  4246.  
  4247. If WindowsVersion > 3.11
  4248.    Exit
  4249. EndIf
  4250.  
  4251. [AddVShare_ChkSec] := PositionOf Quietly in [AddVShare_Options]
  4252. If [AddVShare_ChkSec] = 0
  4253.    ShowBitMap 13 @xy(Center,Center)
  4254.    TextOut @xy(Center,Center) Verifying installation of vshare ....
  4255. EndIf
  4256.  
  4257. :AddVShare_Scan
  4258. [AddVshare_Installed] := UnKnown
  4259.  
  4260. If FileExists [AddVShare_Ini]
  4261.   Else
  4262.    CreateFile [AddVShare_Ini]
  4263.    Goto AddVShare_V386Que
  4264. EndIf
  4265.  
  4266. ExamineTextFile [AddVShare_Ini]    ;; Open file for read/only      
  4267. [AddVShare_FSize]  := TextLineCount    ;; Load number of lines in file
  4268. [AddVShare_Count]  := 0 
  4269.  
  4270. ;; Qualify Section Header for [386Enh]
  4271. [AddVShare_SecLine] := LineNumberWith ([386Enh],,)
  4272. If [AddVShare_SecLine] > 0
  4273.    [AddVShare_OText]     := Line [AddVShare_SecLine]
  4274.   Else
  4275.    Goto AddVShare_V386Que
  4276. EndIf
  4277.  
  4278. ;; See if Device = VShare.386
  4279. [AddVShare_Count] := [AddVShare_SecLine] 
  4280. While [AddVShare_Count] < [AddVShare_FSize]     ;; Scan each line in file
  4281.   IncrementNumber [AddVShare_Count]             ;; Inc current line count
  4282.   [AddVShare_OText] := Line [AddVShare_Count]   ;; Get text of current line
  4283.  
  4284.   [AddVShare_ChkSec] := PositionOf [ in [AddVShare_OText]
  4285.   If [AddVShare_ChkSec] = 1 
  4286.      Goto AddVShare_V386Que
  4287.    EndIf
  4288.  
  4289.   [AddVShare_ChkSec] := PositionOf Device=VShare.386 in [AddVShare_OText]
  4290.   If [AddVShare_ChkSec] = 1
  4291.      [AddVshare_Installed] := Yes 
  4292.      Goto AddVShare_V386Que
  4293.   EndIf
  4294. EndWhile
  4295.  
  4296. :AddVShare_V386Que
  4297. ForgetTextFile
  4298.  
  4299. If [AddVshare_Installed] = UnKnown
  4300.  
  4301.     [AddVShare_ModIni][1] := 386Enh
  4302.     [AddVShare_ModIni][2] := Device
  4303.     [AddVShare_ModIni][3] := VShare.386
  4304.     [AddVShare_ModIni][4] := [AddVShare_Ini]  
  4305.     WritePrivateProfileString Using [AddVShare_ModIni] NoBackUp 
  4306.  
  4307.     [AddVshare_Installed] := Added
  4308.  
  4309. Endif
  4310.  
  4311. If FileExists [AddVShare_FileName]
  4312.   Else
  4313.    CopyFiles From ShadowDirectory To [WindowsSystemDirectory] Quietly
  4314.      VShare.386 
  4315.    EndCopyFiles
  4316.    CopyFiles From ShadowDirectory To [WindowsDirectory] Quietly
  4317.      VShare.386 
  4318.    EndCopyFiles
  4319. EndIf
  4320.  
  4321. [AddVShare_ChkSec] := PositionOf Quietly in [AddVShare_Options]
  4322. If [AddVShare_ChkSec] = 0
  4323.    ClearScreen
  4324. EndIf
  4325.  
  4326. If [AddVshare_Installed] = Added
  4327.    [System_Reboot] := Yes
  4328. EndIf
  4329. EndProcedure
  4330. Procedure FindViews31_Dialog
  4331.  
  4332. ;;:Find_Views
  4333. ;;DialogBox  @xy(center,80) 284 165 Returns [Dialog_Rc] BlackOnLightGray UseHeader "Locate Views Directory"  ;;ShadowDirectory\DTRINST.DBB
  4334. ;;  Font "MS Sans Serif" 8
  4335. ;;  Static @xy(84,7) 190 60 " If you know the correct directory, you may enter the full directory path below. If you do not enter in a directory, all local drives will be searched for the Views directory."
  4336. ;;  Bitmap @xy(8,7) Bitmap 14
  4337. ;;  PushButton FDbDir ProcIs Check_Network_DB @xy(180,155) 45 15 "Next >" 200
  4338. ;;  PushButton @xy(135,155) 45 15 "< &Back" 100 Disabled
  4339. ;;  PushButton @xy(232,155) 45 15 "Cancel" 300 Disabled
  4340. ;;  Static @xy(8,150) 269 1 "" BlackRect
  4341. ;;  GroupBox @xy(84,112) 193 34 "Enter Views directory path:"
  4342. ;;  PushButton InstallDBDir ProcIs Search_DB @xy(224,125) 45 15 "Search" 400
  4343. ;;  EditText @xy(90,125) 129 12 Uses [Idir_DBFiles] Border UpperCase AutoHScroll
  4344. ;;EndDialogBox
  4345. ;;
  4346. ;;If [Dialog_Rc] = 300
  4347. ;;   Do ExitConfirm
  4348. ;;EndIf
  4349.  
  4350. EndProcedure
  4351. Procedure BkstoreId_Check
  4352.  
  4353.  
  4354. If [Reg_CBStore] = 1
  4355.    EnableWindow BksInput.BKS_Edit On
  4356.    Exit
  4357. else
  4358.    EnableWindow BksInput.BKS_Edit Off
  4359.    [BkSt_Name] := BlankString
  4360.    Exit
  4361. EndIf
  4362.  
  4363.  
  4364. EndProcedure
  4365. Procedure ExitConfirm
  4366. If CompletionStatus <> Finished
  4367. [Number25] := RGB(0,0,0)           ;;custom foreground color
  4368. [Number26] := RGB(192,192,192)     ;;custom background color
  4369.  ClearScreen
  4370.    DialogBox ExitProcDialog @xy(center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader "Exit Confirmation"
  4371.       Font "MS Sans Serif" 8
  4372.       Bitmap @xy(8,7) Bitmap 14
  4373.       LText @xy(81,7)  191 50 "You have chosen to exit the Emanuel Electronic Format installation program. The title you have chosen has NOT been installed successfully. Please re-run the install program to install the selected title."
  4374.       LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4375.       PushButton @xy(180,145) 45 15 "Next >" 200 Disabled
  4376.       PushButton @xy(135,145) 45 15 "< &Back" 100 
  4377.       PushButton @xy(232,145) 45 15 "Exit" 300
  4378.       Static @xy(8,140) 269 1 "" BlackRect
  4379.    EndDialogBox
  4380.  
  4381.    If [Dialog_Rc] = 300
  4382.       Solong Quietly
  4383.    EndIf
  4384.  
  4385.    Exit
  4386.  
  4387. EndIf
  4388.  
  4389. EndProcedure
  4390. Procedure Price_Check
  4391. If [Call_Rc] < 0
  4392.       [Price_Return] := 0
  4393.    Else     
  4394.           [Price_Return] := [Call_Rc]
  4395.       EndIf
  4396.  
  4397.    If [Call_Rc] = 1
  4398.       [Err_Desc] := 'Registration Failure ([Call_Rc])'
  4399.       [Err_Text] := The server may be down or busy.
  4400.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  4401.        UnLoadDll [Dll1]  
  4402.        UnLoadDll [Dll1]  
  4403.        UnLoadBitMap 13
  4404.       do ErrorMsg
  4405.        Exit
  4406.    EndIf 
  4407.  
  4408.    If [Call_Rc] = 2
  4409.       [Err_Desc] := 'Invalid credit card/exp date ([Call_Rc])'
  4410.       [Err_Text] := The credit card number could not be authorized.
  4411.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  4412.        UnLoadDll [Dll1]  
  4413.        UnLoadDll [Dll1]  
  4414.        UnLoadBitMap 13
  4415.       do ErrorMsg
  4416.        Exit
  4417.    EndIf 
  4418.  
  4419.    If [Call_Rc] = 3
  4420.       [Err_Desc] := 'Unable to process credit card ([Call_Rc])'
  4421.       [Err_Text] := The credit card number could not be authorized.
  4422.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  4423.        UnLoadDll [Dll1]  
  4424.        UnLoadBitMap 13
  4425.       do ErrorMsg
  4426.         Exit
  4427.    EndIf 
  4428.  
  4429.    If [Call_Rc] = 4
  4430.       [Err_Desc] := 'Unable to process credit info ([Call_Rc])'
  4431.       [Err_Text] := Unable to process credit information.
  4432.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  4433.        UnLoadDll [Dll1]  
  4434.        UnLoadDll [Dll1]  
  4435.        UnLoadBitMap 13
  4436.       do ErrorMsg
  4437.        Exit
  4438.    EndIf 
  4439.  
  4440.    If [Call_Rc] = 10
  4441.       [Err_Desc] := 'Server database is down or not online ([Call_Rc])'
  4442.       [Err_Text] := The database cannot be accessed at this time.
  4443.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  4444.        UnLoadDll [Dll1]  
  4445.        UnLoadDll [Dll1]  
  4446.        UnLoadBitMap 13
  4447.       do ErrorMsg
  4448.        Exit
  4449.    EndIf 
  4450.  
  4451.    If [Call_Rc] = 11
  4452.       [Err_Desc] := 'Credit Card denied (Call_Rc])'
  4453.       [Err_Text] := Credit card is invalid, and cannot be charged.
  4454.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  4455.        UnLoadDll [Dll1]  
  4456.        UnLoadDll [Dll1]  
  4457.        UnLoadBitMap 13
  4458.       do ErrorMsg
  4459.        Exit
  4460.    EndIf 
  4461.  
  4462.    If [Call_Rc] = 12
  4463.       [Err_Desc] := 'Invalid ProductId ([Call_Rc])'
  4464.       [Err_Text] := The current productId is invalid.
  4465.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  4466.        UnLoadDll [Dll1]  
  4467.        UnLoadDll [Dll1]  
  4468.        UnLoadBitMap 13
  4469.       do ErrorMsg
  4470.        Exit
  4471.    EndIf 
  4472.  
  4473.    ;;[String1] = 13 msg, continue
  4474.    ;;          = 14 msg, cancel
  4475.  
  4476.    [String29] := 13
  4477.    If "[String1]" = "[String29]" 
  4478.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  4479.        UnLoadDll [Dll1]  
  4480.        UnLoadDll [Dll1]  
  4481.        UnLoadBitMap 13
  4482.       Do SvrMessage
  4483.    EndIf
  4484.  
  4485.    [String29] := 14
  4486.    If "[String1]" = "[String29]"      
  4487.        CallDll [Dll1] Terminate() Returns short [Call_Rc]
  4488.        UnLoadDll [Dll1]  
  4489.        UnLoadBitMap 13
  4490.       Do NoInstall 
  4491.    EndIf
  4492.  
  4493.  
  4494. EndProcedure
  4495. Procedure RegUser2
  4496.  
  4497.  
  4498. ;;If [RegUser1_Back] = Yes
  4499. ;;   Goto RegUser1_Input 
  4500. ;;Else
  4501. ;;   SetMouseCursor Wait
  4502. ;;   UnLoadBitMap 13
  4503. ;;   LoadBitMap 13 ShadowDirectory\OneM.BMP
  4504. ;;   ShowBitMap 13 @xy(Center,Center)
  4505. ;;   TextOut OnBitMap 13 @xy(60,25) Loading Registration Form ...
  4506. ;;EndIf
  4507.  
  4508. ;; ------------------------------
  4509. ;; Load List of law schools
  4510. ;; Format:Law School A=1
  4511. ;;
  4512.  
  4513. If FileExists ShadowDirectory\School.Idx
  4514.    SetTokenDelimiterTo =
  4515.  
  4516.   [Schools_List] := ShadowDirectory\School.idx
  4517.  
  4518.   If [Reg_SchoolId] = BlankString
  4519.      [Reg_SchoolIdX] := [Schools_List][1] 
  4520.   EndIf
  4521.  
  4522.   Else
  4523.    [Reg_SchoolIdX] := (No Schools Found)
  4524.    [Schools_List][1] := [Reg_SchoolIdX]
  4525. EndIf
  4526.  
  4527. ;; ------------------------------
  4528. ;; Set defaults if not set
  4529. ;;
  4530. If [Reg_GradYear] = BlankString
  4531.    [Reg_GradYear] := [GradYear_Beg]
  4532. EndIf
  4533.  
  4534. If [Reg_OSFRb] = 0
  4535.    [Reg_OSFRb] := 1
  4536. EndIf
  4537.  
  4538. If [Reg_OSFRb] > 1
  4539.    [Student_Info] := Disabled   
  4540. EndIf
  4541.  
  4542. [Number1] := 0
  4543. While [Number1] < 12
  4544.   IncrementNumber [Number1]
  4545.   If [Number1] > 9
  4546.      [Exp_MonthLst][[Number1]] := [Number1]
  4547.     Else
  4548.      [Exp_MonthLst][[Number1]] := 0[Number1]
  4549.   EndIf
  4550. EndWhile
  4551. [Number1] := 95
  4552. While [Number1] < 100
  4553.   IncrementNumber [Number1]
  4554.   If [Number1] = 100
  4555.      [String1] := 00 
  4556.     Else
  4557.      [String1] := [Number1]
  4558.   EndIf
  4559.   [String2] := SubStringOf [String1] From 1 To 2 
  4560.   [Exp_YearLst][[Number1]] := [String2]
  4561. EndWhile
  4562.  
  4563. If [Exp_Month] = BlankString
  4564.    [Exp_Month] := 01
  4565. EndIf
  4566. If [Exp_Year] = BlankString
  4567.    [Exp_Year] := 96
  4568. EndIf
  4569.  
  4570.  
  4571. ;; ------------------------------
  4572. ;; Display user registration screen
  4573. ;;
  4574. SetMouseCursor Arrow
  4575. UnloadBitMap 13
  4576.  
  4577. :RegUser1_Input
  4578.  
  4579.    DialogBox RegScreen @xy(CenterScreen,80) 306 164 Returns [Dialog_Rc] BlackOnWhite UseHeader "Emanuel Electronic Format Software Registration"
  4580.       Font "MS Sans Serif" 8
  4581.  
  4582.       GroupBox @xy(8,18) 124 30 "Name"
  4583.       StaticText @xy(12,25) 36 10 "First"
  4584.       EditText @xy(12,33) 44 12 Uses [Reg_FName] AutoHScroll Border
  4585.       LText @xy(60,25) 14 12 "MI"
  4586.       EditText @xy(60,33) 12 12 Uses [Reg_MName] Border UpperCase
  4587.       StaticText @xy(76,25) 36 12 "Last"
  4588.       EditText @xy(76,33) 50 12 Uses [Reg_LName] AutoHScroll Border
  4589.  
  4590.       GroupBox @xy(8,50) 124 105 "Address Information"
  4591.       LText @xy(12,58) 60 10 "School Address"
  4592.       EditText @xy(12,68) 115 12 Uses [Reg_Addr1] AutoHScroll Border
  4593.       EditText @xy(12,80) 115 12 Uses [Reg_Addr2] AutoHScroll Border
  4594.       LText @xy(12,94) 36 10 "City"
  4595.       EditText @xy(12,104) 59 12 Uses [Reg_City] AutoHScroll Border
  4596.       LText @xy(76,94) 21 10 "State"
  4597.       EditText @xy(76,104) 16 12 Uses [Reg_State] Border UpperCase
  4598.       LText @xy(98,94) 30 10 "Zip Code"
  4599.       EditText @xy(98,104) 25 12 Uses [Reg_Zip] Border
  4600.       LText @xy(12,117) 36 10 "Phone"
  4601.       EditText @xy(12,126) 59 12 Uses [Reg_Phone] Border
  4602.       LText @xy(76,117) 42 10 "E-Mail Address"
  4603.       EditText @xy(76,126) 50 12 Uses [Reg_EMail] AutoHScroll Border
  4604.  
  4605.       PushButton PB_HomeAddr ProcIs HomeAddress @xy(35,140) 69 12 "Permanent Address" 400
  4606.  
  4607.       GroupBox @xy(138,18) 160 80 "School Information"
  4608.       LText @xy(143,25) 59 10 "Law School"
  4609.       ComboBox @xy(143,35) 150 100 Uses [Reg_SchoolIdX] LoadWith [Schools_List] DropDownList 
  4610.       RadioButtonGroup ProcIs StudentType Uses [Reg_OSFRb]
  4611.          RadioButton @xy(143,60) 50 8 "Student" 
  4612.          RadioButton @xy(143,68) 50 8 "Professor"
  4613.          RadioButton @xy(143,76) 50 8 "Librarian"
  4614.          RadioButton @xy(143,84) 50 8 "Dean"
  4615.          RadioButton @xy(200,76) 70 8 "Placement Director"
  4616.          RadioButton @xy(200,84) 70 8 "Other"
  4617.  
  4618.       LText @xy(220,51) 36 10 "Grad Year"
  4619.       ComboBox CB_GradYear @xy(220,61) 30 70 Uses [Reg_GradYear] LoadWith [GradYear_List] DropDownList Sort [Student_Info]
  4620.  
  4621.       GroupBox @xy(138,100) 160 40 "Credit Information"
  4622.       LText @xy(152,110) 70 10 "Credit Card Number"
  4623.       EditText @xy(152,120) 75 12 Uses [Reg_CCNo] Border
  4624.       LText @xy(240,110) 32 10 "Exp. Date"
  4625.  
  4626.       ComboBox @xy(240,120) 20 70 Uses [Exp_Month] LoadWith [Exp_MonthLst] DropDownList
  4627.       ComboBox @xy(260,120) 20 55 Uses [Exp_Year]  LoadWith [Exp_YearLst]  DropDownList
  4628.  
  4629.       PushButton Back                          @xy(153,145) 45 15 "< &Back" 200
  4630.       PushButton RegCheck  @xy(198,145) 45 15 "Next >" 100
  4631.       PushButton RegCancel ProcIs ExitConfirm  @xy(252,145) 45 15 "Cancel" 300
  4632.  
  4633.    EndDialogBox
  4634.  
  4635. if [Dialog_Rc] = 100
  4636.    do RegUser_Check
  4637.    if [Dialog_Rc] = 200 
  4638.       goto RegUser1_Input
  4639.    EndIf
  4640.  
  4641.    if [Dialog_Rc] = 300
  4642.       [Dialog_Rc] := 100
  4643.    EndIf
  4644. EndIf
  4645.  
  4646. If [Dialog_Rc] = 300
  4647.    Do ExitConfirm
  4648. EndIf
  4649.  
  4650. If [Dialog_Rc] = 200
  4651.    [RegUser1_Back] := Yes
  4652.    Goto BksId
  4653.   Else
  4654.    [RegUser1_Back] := BlankString
  4655. EndIf
  4656.  
  4657.  
  4658. ;; Submitt user registration form to server
  4659. ;;
  4660.  
  4661.  
  4662. If [Dialog_Rc] = 100
  4663.    SetMouseCursor Wait
  4664.  
  4665.  
  4666.    ;; Set vars
  4667.    ;;  
  4668.    [Reg_ExpDate] := [Exp_Month]/[Exp_Year] 
  4669.  
  4670.    ;; Filter chars to correct length
  4671.    ;;    
  4672.    If [Reg_SchoolId] = BlankString
  4673.       ExamineTextFile ShadowDirectory\School.Dat
  4674.         [Reg_SchoolId] := SettingFor  [Reg_SchoolIdX]
  4675.       ForgetTextFile
  4676.    EndIf
  4677.  
  4678.    [Reg_IAttempt]  := F
  4679.  
  4680. If WindowsVersion > 3.11
  4681.    [Reg_InstallOS] := W95
  4682.   Else
  4683.    [Reg_InstallOS] := WIN
  4684. EndIf
  4685.  
  4686. Do CharFilter
  4687.  
  4688. ;;Bookstore Name or "Unknown" if checkbox "Don't know is selected"
  4689. ;;Student's Code - If they choose to participate
  4690. ;;
  4691. If [Reg_CBStore] = 2
  4692.    [BkSt_Name] := UnKnown
  4693. EndIf
  4694.  
  4695.  
  4696. ;;   If [Reg_OSFRb] > 1
  4697. ;;      [Reg_GradYear] := BlankString
  4698. ;;      [Reg_CBLawReview] := 0
  4699. ;;      [Reg_CBLawReview1] := 0
  4700. ;;   EndIf
  4701.      SetMouseCursor Arrow
  4702. EndIf
  4703. Exit DismissDialog
  4704. EndProcedure
  4705. Procedure GenStudentCode
  4706.  
  4707.  
  4708. [String1] := SubStringOf [Reg_LName] From 1 To 4
  4709. [String2] := SubStringOf [Reg_FName] From 1 To 2 
  4710.  
  4711. [String3] := SystemDate 
  4712. [String4] := SubStringOf [String3] From 4 To 5
  4713. ;; [String5] := SubStringOf [String3] From 1 To 2
  4714.  
  4715. [Temp_Code] := [String1][String2][String4]   ;; [String5]
  4716. [Student_Code] := ToUpper [Temp_Code]
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724. EndProcedure
  4725. Procedure NoInstall
  4726. UnloadBitmap 13
  4727. ClearScreen
  4728. :NoInstall_Beg
  4729.  
  4730. [Reg_IAttempt] := C
  4731. ModifyTextFile [WindowsDirectory]\ELForms.Dat NoBackUp Quietly
  4732.  AddOrChangeLineWith (IAttempt=,,) As "IAttempt=[Reg_IAttempt]" At End
  4733. EndModifyTextFile
  4734.  
  4735. [ByeBye_Desc]  := The installation of '[Infobase_Title]' cannot continue. See the server message below for more information.
  4736. [ByeBye_Desc1] := [String2]
  4737.  
  4738. SetCompletionStatusTo Finished
  4739.  
  4740. DialogBox  @xy(center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader " Cannot continue Installation "  
  4741.   Font "MS Sans Serif" 8
  4742.   BitMap @xy(8,7) BitMap 14
  4743.   LText @xy(83,7) 190 100 "[ByeBye_Desc]"
  4744.   LText @xy(83,47) 190 70 "[ByeBye_Desc1]"
  4745.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4746.   PushButton @xy(230,145) 45 15 "Finish" 200
  4747.   Static @xy(8,140) 269 1 "" BlackRect
  4748. EndDialogBox
  4749.  
  4750. SoLong Quietly
  4751.  
  4752.  
  4753. EndProcedure
  4754. Procedure SvrMessage
  4755. ClearScreen
  4756.  
  4757. [ByeBye_Desc]  := During the installation of '[Infobase_Title]' a message was received from the server. See the server message below for more information.
  4758. [ByeBye_Desc1] := [String2]
  4759.  
  4760. SetCompletionStatusTo Finished
  4761.  
  4762. DialogBox  @xy(center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader " Installation Note "  
  4763.   Font "MS Sans Serif" 8
  4764.   BitMap @xy(8,7) BitMap 14
  4765.   LText @xy(83,7) 190 100 "[ByeBye_Desc]"
  4766.   LText @xy(83,47) 190 70 "[ByeBye_Desc1]"
  4767.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4768.   PushButton @xy(230,145) 45 15 "Continue" 200
  4769.   Static @xy(8,140) 269 1 "" BlackRect
  4770. EndDialogBox
  4771.  
  4772.  
  4773.  
  4774. EndProcedure
  4775. Procedure NoPvl
  4776. DialogBox  @xy(center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader "PVL Not Found "  
  4777.   Font "MS Sans Serif" 8
  4778.   BitMap @xy(8,7) BitMap 14
  4779.   LText @xy(83,7) 190 100 "Enter Download Directory:"
  4780.   LText @xy(83,47) 190 70 "Enter Download File Name:"
  4781.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4782.   PushButton @xy(230,145) 45 15 "Continue" 200
  4783.   Static @xy(8,140) 269 1 "" BlackRect
  4784. EndDialogBox
  4785.  
  4786. EndProcedure
  4787. Procedure FPFile
  4788.  
  4789.  
  4790. ;; Default search for root location
  4791. ;; must add a trailing \
  4792. ;;
  4793. [Views31IDir] := BlankString
  4794.  
  4795. ClearArray [Views31Dirs]
  4796. [FPFile_CurDrive] := C
  4797. While [FPFile_CurDrive] < Z
  4798. [SSkip] := 0
  4799.  
  4800.   If DriveIsPresent [FPFile_CurDrive]
  4801.  
  4802.      If DriveIsRemote [FPFile_CurDrive]            ;; Drive is on the network
  4803.         ;; PopUp Not Searching Remote [FPFile_CurDrive]      
  4804.         [SSkip] := 1
  4805.         Goto FPFile_NextDrive
  4806.      EndIf
  4807.  
  4808.      If FreeSpaceOnDrive [FPFile_CurDrive] < 1    ;; CDROM Present no CDROM disk in drive
  4809.         ;; PopUp Not Searching [FPFile_CurDrive]      
  4810.         [SSkip] := 1
  4811.         Goto FPFile_NextDrive
  4812.      EndIf
  4813.  
  4814.      If FreeSpaceOnDrive [FPFile_CurDrive] = 0     ;; No freespace, cannot write to drive
  4815.         If DirectoryAllowable [FPFile_CurDrive]:\  ;; Probably a CDRom drive...
  4816.           Else 
  4817.          ;;  PopUp Not Searching [FPFile_CurDrive]
  4818.            [SSkip] := 1
  4819.               Goto FPFile_NextDrive
  4820.         EndIf
  4821.      EndIf
  4822.  
  4823.      If [SSkip] = 0
  4824.         ;; PopUp Searching [FPFile_CurDrive]
  4825.         ClearArray [FPFile_Dirs] 
  4826.         [FPFile_Dirs] := FullPathTo [FPFile_Name] Origin=[FPFile_CurDrive]:\ Quietly
  4827.  
  4828. ;;GetMenuChoice
  4829. ;;[FPFile_Dirs]
  4830. ;;EndGetMenuChoice
  4831.  
  4832.         [Number1] := LastIndexUsedFor [FPFile_Dirs]
  4833.         If [Number1] > 0
  4834.            [Number2] := 0
  4835.            While [Number2] < [Number1] 
  4836.              IncrementNumber [Number2]
  4837.              [String1] := [FPFile_Dirs][[Number2]] 
  4838.  
  4839.              ;; Filter Duplicate entries
  4840.              [Number21] := 0
  4841.              [Number31] := LastIndexUsedFor [Views31Dirs]
  4842.              [Number32] := 0
  4843.  
  4844.              If [Number31] > 0 
  4845.              While [Number21] < [Number31] 
  4846.                IncrementNumber [Number21]
  4847.                [String21] := [Views31Dirs][[Number21]]
  4848.                If [String21] = [String1]
  4849.                   Goto FPFile_FDupCheck 
  4850.                EndIf
  4851.              EndWhile 
  4852.              EndIf 
  4853.              IncrementNumber [Number31]
  4854.              [Views31Dirs][[Number31]] := [String1]
  4855.              :FPFile_FDupCheck 
  4856.            EndWhile
  4857.            ;; Goto File_Found
  4858.         EndIf
  4859.      EndIf
  4860.   EndIf
  4861.  
  4862.   :FPFile_NextDrive
  4863.   IncrementString [FPFile_CurDrive]
  4864. EndWhile
  4865.  
  4866. ;;:File_Found
  4867. ;;GetMenuChoice
  4868. ;;[Views31Dirs]
  4869. ;;EndGetMenuChoice
  4870. ;;
  4871.  
  4872. EndProcedure
  4873. Procedure QueBViews
  4874. QueFileGroup 21 To [InstallationDirectory]\BViews    ;; QueBViews pvl file
  4875.  
  4876. EndProcedure
  4877. Procedure Ctl3dv2
  4878. If FileExists [WindowsSystemDirectory]\CTL3dv2.Dll
  4879.   Else  
  4880.    CopyFiles From ShadowDirectory To [WindowsSystemDirectory] Quietly
  4881.      CTL3dv2.Dll
  4882.    EndCopyFiles
  4883. EndIf
  4884.  
  4885. EndProcedure
  4886.  
  4887. ;;*******************************************************************************************
  4888. ;; HPI
  4889. ;; 600 Boulevard South, Suite 305
  4890. ;; Huntsville Al,  35802
  4891. ;;
  4892. ;; HPI is the solution provider for the installation industry.
  4893. ;;  * * * 
  4894. ;;
  4895. ;;*****************************************************************************************
  4896. ;; Init System variables
  4897. ;;
  4898. [System_StartTime] := SystemTime
  4899. [System_CMDLine]   := [CommandLine0] [CommandLine1] [CommandLine2] [CommandLine3] [CommandLine4] [CommandLine5]
  4900. [System_TempDir]   := ShadowDirectory
  4901.  
  4902. ;; Init vars from Cmdline parameters
  4903. ;;
  4904. ;; -P:Product name
  4905. ;; 
  4906.  
  4907. ;; Init Installation
  4908. ;;
  4909. Do Setup         ;; SetUp Screen Displays and Colors
  4910.  
  4911. ;; Display main dialog
  4912. ;;
  4913.  
  4914. SetMouseCursor Arrow
  4915. :MainMenu
  4916. [Number25] := RGB(0,0,0)           ;;custom foreground color
  4917. [Number26] := RGB(192,192,192)     ;;custom background color
  4918.  
  4919.    DialogBox WelcomeDialog @xy(center,80) 284 172 Returns  [Dialog_Rc] BlackOnLightGray UseHeader "Welcome to Emanuel Electronic Format!"
  4920.       Font "MS Sans Serif" 8
  4921.       Bitmap @xy(8,7) Bitmap 14
  4922.       LText @xy(81,7)  191 50 "You have chosen to install [Infobase_Title]. This software contains both a FREE demo version and also the full text of the print version of the Emanuel, plus features you won't find anywhere else, like full-text searchability and instant jumplinks."
  4923.       LText @xy(81,52) 191 55 "The full-version text comes with a MONEY BACK GUARANTEE: if youÆre not completely satisfied with the software within 30 days, run the uninstaller program supplied with the software, write down the code the uninstaller program will give you, and call us at 1-800-EMANUEL; weÆll cheerfully refund your money."
  4924.       LText @xy(81,105) 191 55 "During the install process, the install program will connect you to our online registration system and allow you to unlock the title. If you don't have a modem or cannot access the on-line registration system, we'll provide you with an alternative registration method."
  4925.       LText @xy(8,155) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4926.       PushButton @xy(180,155) 45 15 "Next >" 200
  4927.       PushButton @xy(135,155) 45 15 "< &Back" 100 Disabled
  4928.       PushButton C_Button ProcIs ExitConfirm @xy(232,155) 45 15 "Cancel" 300
  4929.       Static @xy(8,150) 269 1 "" BlackRect
  4930.    EndDialogBox
  4931.  
  4932. ;;If [Dialog_Rc] = 300
  4933. ;;   Do ExitConfirm
  4934. ;;EndIf
  4935.  
  4936. :Install_Type
  4937. If [Dialog_RcMain] = 0
  4938.    [Dialog_RcMain] := 1
  4939. EndIf
  4940. DialogBox  @xy(center,80) 284 165 Returns  [Dialog_Rc] BlackOnLightGray UseHeader " Select Installation Type " 
  4941.   Font "MS Sans Serif" 8
  4942.   Bitmap @xy(8,7) Bitmap 14
  4943.   LText @xy(84,7) 181 23 "Select your preferred installation type and click 'Next' to continue."
  4944.   LText @xy(160,40) 105 19 "(Use this option to install the demo version.)"
  4945.   LText @xy(160,60) 100 10 "Price: FREE!"
  4946.   LText @xy(160,85) 119 34 "(Select this option to install the full product version.)"
  4947.   LText @xy(160,105) 100 10 "Price: $19.95"
  4948.   LText @xy(160,120) 120 30 "VISA, MASTERCARD, AMERICAN EXPRESS ACCEPTED"
  4949.   LText @xy(8,145) 120 16 "⌐ 1996 Emanuel Law Outlines, Inc."
  4950.   PushButton @xy(180,145) 45 15 "Next >" 200
  4951.   PushButton @xy(135,145) 45 15 "< &Back" 100
  4952.   PushButton C_Button ProcIs ExitConfirm @xy(232,145) 45 15 "Cancel" 300
  4953.   Static @xy(8,140) 269 1 "" BlackRect
  4954.  
  4955.       RadioButtonGroup Uses [Dialog_RcMain]
  4956.       RadioButton @xy(88,40) 63 10 "Demo Install"
  4957.       RadioButton @xy(88,85) 59 10 "Full Install"
  4958.    EndDialogBox
  4959.  
  4960. ;;If [Dialog_Rc] = 300
  4961. ;;   Do ExitConfirm
  4962. ;;EndIf
  4963.  
  4964. If [Dialog_Rc] = 100
  4965.    Goto MainMenu
  4966. EndIf
  4967.  
  4968. If [Dialog_Rc] = 200
  4969.    If [Dialog_RcMain] = 2
  4970.       [Install_Type] := Full
  4971.      Else
  4972.       [Install_Type] := Demo
  4973.    EndIf
  4974. EndIf
  4975.  
  4976. ;; Get install directory
  4977. ;;
  4978. :InstallCheck
  4979. Do InstallCheck
  4980. If [Dialog_Rc] = 100
  4981.    Goto Install_Type
  4982. EndIf
  4983.  
  4984. ;; Get program group
  4985. ;;
  4986. :GetGroup
  4987. [GetGroup_DefaultGrp] := [Default_Program_Group]
  4988. Do GetGroup
  4989. If [Dialog_Rc] = 100
  4990.    Goto InstallCheck
  4991. EndIf
  4992.  
  4993. if [Install_Type] = Demo
  4994.     Goto InstallFiles
  4995.   ;;Do ByeBye
  4996. EndIf
  4997.  
  4998. ;; Load Registration Data
  4999. Do GetRegData
  5000.  
  5001. ;; Get student referral
  5002. ;;
  5003. :SRef
  5004. Do SRefScreen
  5005. If [Dialog_Rc] = 100
  5006.    Goto GetGroup
  5007. EndIf
  5008.  
  5009. ;; Get Book store id
  5010. ;;
  5011. :BksId
  5012. Do BkStoreId
  5013. If [Dialog_Rc] = 100
  5014.    Goto SRef
  5015. EndIf
  5016.  
  5017. ;; Do user registration
  5018. ;;
  5019. :RegisterUser
  5020. [Last_Screen] := RegUser1
  5021.  
  5022. Do RegUser2
  5023. ;;If [Dialog_Rc] = 100
  5024. ;;  Goto BksId
  5025. ;;EndIf
  5026.  
  5027. UpdateWindow
  5028.  
  5029. :StRefInquiry
  5030. [Last_Screen] := StRefInquiry
  5031.  
  5032. Do StRefInquiry
  5033. If [Dialog_Rc] = 100
  5034.    [RegUser1_Back] := Yes
  5035.     Goto RegisterUser
  5036. EndIf
  5037.  
  5038. If [Dialog_RbYesNo] = 1
  5039.  
  5040.    :SrReadMe
  5041.    [Last_Screen] := SrReadMe
  5042.  
  5043.    Do SrReadMe
  5044.    If [Dialog_Rc] = 100
  5045.       Goto StRefInquiry
  5046.    EndIf
  5047.  
  5048.    :JoinYesNo   
  5049.    [Last_Screen] := JoinYesNo
  5050.  
  5051.    Do JoinYesNo   
  5052.    If [Dialog_Rc] = 100
  5053.       Goto SrReadMe
  5054.    EndIf
  5055.    
  5056.    If [Dialog_RbYesNo1] = 1
  5057.      [Last_Screen] := JoinYes
  5058.      :JoinYes
  5059.      Do JoinYes
  5060.      If [Dialog_Rc] = 100
  5061.         Goto JoinYesNo
  5062.      EndIf
  5063.   EndIf 
  5064.  
  5065. EndIf
  5066.  
  5067.    ;; Save data to data file 
  5068.    ;; Update user registration form file
  5069.    ;;
  5070.    If FileExists [WindowsDirectory]\ELForms.Dat
  5071.       DeleteFiles From [WindowsDirectory] Quietly
  5072.         ELForms.Dat
  5073.       EndDeleteFiles
  5074.    EndIf
  5075.    AppendFile [WindowsDirectory]\ELForms.Dat
  5076.      Student=[Student_Code]      ;; Should use Student_Code
  5077.      FName=[Reg_FName]     
  5078.      LName=[Reg_LName]   
  5079.      MName=[Reg_MName]     
  5080.      Addr1=[Reg_Addr1]     
  5081.      Addr2=[Reg_Addr2]     
  5082.      City=[Reg_City]      
  5083.      State=[Reg_State]     
  5084.      Zip=[Reg_Zip]       
  5085.      Phone=[Reg_Phone]     
  5086.      RegH_Addr1=[RegH_Addr1]
  5087.      RegH_Addr2=[RegH_Addr2]
  5088.      RegH_City=[RegH_City]
  5089.      RegH_State=[RegH_State]
  5090.      RegH_Zip=[RegH_Zip]
  5091.      RegH_Phone=[RegH_Phone]
  5092.      SRef_Code=[SRef_Code]
  5093.      SRef_Name=[SRef_Name] 
  5094.      SRef_School=[SRef_School]  
  5095.      SchoolId=[Reg_SchoolId]  
  5096.      BookStore=[BkSt_Name]
  5097.      GradYear=[Reg_GradYear]
  5098.      Member=[Reg_OSFRb]
  5099.      EMail=[Reg_EMail]     
  5100.      Media=[Reg_Media]     
  5101.      InstallOS=[Reg_InstallOS]
  5102.      SoftwareVersion=[Version_Number]
  5103.      ProductId=[Product_ID]
  5104.      CCNo=[Reg_CCNo]      
  5105.      ExpDate=[Reg_ExpDate]   
  5106.  
  5107.      [Internal Variables]
  5108.      OSFRB=[Reg_OSFRb]
  5109.      IAttempt=[Reg_IAttempt] 
  5110.      ExpMonth=[Exp_Month]
  5111.      ExpYear=[Exp_Year]   
  5112.      RegSchoolIdX=[Reg_SchoolIdX]
  5113.    EndAppendFile
  5114.  
  5115.  
  5116. :DialP
  5117. Do DialPreFix
  5118. If [Dialog_Rc] = 100
  5119.    If [Last_Screen] = JoinYes
  5120.        Goto JoinYes
  5121.    EndIf
  5122.    if [Last_Screen] = JoinYesNo
  5123.      Goto JoinYesNo
  5124.    EndIf
  5125.    if [Last_Screen] = SrReadMe
  5126.      Goto SrReadMe
  5127.    EndIf
  5128.    if [Last_Screen] = StRefInquiry
  5129.      Goto StRefInquiry
  5130.    EndIf
  5131.    if [Last_Screen] = RegUser1
  5132.      Goto RegisterUser
  5133.    EndIf
  5134.        
  5135. EndIf
  5136.  
  5137. Do SendData
  5138. If [Dialog_Rc] = 100 .OR. [Dialog_Rc] = 200
  5139.    Goto DialP
  5140. EndIf
  5141. If [Dialog_Rc] = 300
  5142.    UpDateWindow
  5143.    Do OnLine
  5144.    If [Dialog_Rc] = 100
  5145.       Goto DialP
  5146.    EndIf
  5147. EndIf
  5148.  
  5149. ;; Get installation info, install directory, program group
  5150. ;; do installation checks
  5151. ;;
  5152. :InstallFiles
  5153.  
  5154. [IDIR_BViews] := [InstallationDirectory]\BVIEWS
  5155. [IDIR_Demo]   := [InstallationDirectory]\Demo
  5156. [IDIR_Info]   := [InstallationDirectory]\InfoBase
  5157. [IDIR_SDW]    := [InstallationDirectory]\EEF
  5158.  
  5159. SetMouseCursor Wait
  5160. ;; Find Views31 exe file
  5161. ;;
  5162. :FindViews
  5163. Do FindViews31
  5164. If [Dialog_Rc] = 100
  5165.    If [Install_Type] = Demo
  5166.       Goto GetGroup
  5167.    EndIf
  5168. EndIf
  5169. SetMouseCursor Wait
  5170. ;; Install required files
  5171. ;;
  5172. Do FullInstall
  5173. SetMouseCursor Wait
  5174. ;; Install Visual Release Icons
  5175. Do IIcons
  5176. ClearScreen
  5177. SetMouseCursor Wait
  5178.  
  5179. ;; Modify LNAME.Ini file info
  5180. ;;
  5181. Do ModIni
  5182.  
  5183. if [Install_BViews] = Yes
  5184.    [AddVShare_FileName] := [WindowsSystemDirectory]\VShare.386
  5185.    [AddVShare_Ini]      := [WindowsDirectory]\System.Ini
  5186.    [AddVShare_Options]  := BlankString ;;Quietly
  5187.    Do AddVShare
  5188.  
  5189.    Do Ctl3dv2
  5190. EndIf
  5191.  
  5192. ClearScreen
  5193. HideBitMap 13
  5194.  
  5195. ;; Installation complete, display exit screen
  5196. ;;
  5197. SetMouseCursor Arrow
  5198.  
  5199. Do ByeBye
  5200.  
  5201. EndScript
  5202.  
  5203.